-----------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\C
> h4.log
  log type:  text
 opened on:  26 Jul 2023, 16:05:35

. 
.         ******************************
.         **** Set directory, seed *****
.         ******************************
.                 set more off 

.                 set matsize 1000
set matsize ignored.
    Matrix sizes are no longer limited by c(matsize) in modern Statas.  Matrix
    sizes are now limited by edition of Stata.  See limits for more details.

.                 global seed ="984353"

.                 set scheme plotplain

.                 cd "$dir"
C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction

. 
.                 * Load data *
.                 use pers-use,clear

.                 drop if persparty==.
(0 observations deleted)

.                 
.                 * GNB 2012: non-personalist leader dies a naturual death 9 Jan 20
> 12; 
.                 * interim president takes over and their is a coup in April 
.                 * drop the interim leader who is unelected *
.                 drop if GNB==1
(1 observation deleted)

.                 
.                 * Erosion indicators *
.                 forval i = 5(1)15 {
  2.                         di `i'
  3.                         local c = `i'/100
  4.                         gen decline`i' = (v2x_polyarchy - ivdem)<=-`c'  if  iv
> dem~=. & v2x_polyarchy~=.
  5.                         xtset lid year 
  6.                         gen ld`i'=l.decline`i'  
  7.                 }
5

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(592 missing values generated)
6

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(592 missing values generated)
7

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(592 missing values generated)
8

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(592 missing values generated)
9

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(592 missing values generated)
10

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(592 missing values generated)
11

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(592 missing values generated)
12

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(592 missing values generated)
13

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(592 missing values generated)
14

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(592 missing values generated)
15

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(592 missing values generated)

.                 
.                 * Update for collapse in 2020 *
.                 recode gwf_back (0=1) if year==2020 & (country=="Mali")
(1 changes made to gwf_back)

.                                 
.                 * Generate some confounders *
.                 gen econcrisis = l12gr<-2 if l12gr~=.
(117 missing values generated)

.                 tab econcrisis  

 econcrisis |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      2,105       92.57       92.57
          1 |        169        7.43      100.00
------------+-----------------------------------
      Total |      2,274      100.00

.                 gen d1 =gwf_duration

.                 gen d2 = d1^2

.                 gen d3 = d1^3

.                 replace lnparty = ln(1+partyage)
(0 real changes made)

.                 gen osupdem = l1supdem if year==min
(2,017 missing values generated)

.                 replace osupdem = l2supdem if year==min & osupdem==.
(0 real changes made)

.                 replace osupdem = supdem if year==min & osupdem==.
(16 real changes made)

.                 egen isupdem = max(osupdem),by(lid)
(684 missing values generated)

.                 gen opolar = l1polar  if year==min
(1,822 missing values generated)

.                 replace opolar  = l2polar  if year==min & opolar ==.
(0 real changes made)

.                 replace opolar  = polar  if year==min & opolar ==.
(1 real change made)

.                 egen ipolar  = max(opolar),by(lid)
(78 missing values generated)

.                 gen time= year-1990

.                 
.                 * Missingness in support for democracy *
.                 gen miss = isupdem==.

.                 local var = "gwf_back ld ivdem lpop year persparty create"

.                 foreach v of local var {
  2.                         ttest `v',by(miss)unequal
  3.                 } 

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,707    .0087873    .0022596    .0933554    .0043556    .0132191
       1 |     684    .0292398    .0064466    .1686012    .0165822    .0418974
---------+--------------------------------------------------------------------
Combined |   2,391    .0146382    .0024566    .1201249    .0098208    .0194556
---------+--------------------------------------------------------------------
    diff |           -.0204524    .0068311               -.0338602   -.0070447
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -2.9940
H0: diff = 0                     Satterthwaite's degrees of freedom =  855.951

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0014         Pr(|T| > |t|) = 0.0028          Pr(T > t) = 0.9986

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,707    3.225139    .0238818    .9866978    3.178299     3.27198
       1 |     684    2.503408    .0448736    1.173596    2.415302    2.591515
---------+--------------------------------------------------------------------
Combined |   2,391    3.018672    .0223558     1.09315    2.974833    3.062511
---------+--------------------------------------------------------------------
    diff |            .7217309    .0508329                .6219895    .8214722
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  14.1981
H0: diff = 0                     Satterthwaite's degrees of freedom =   1089.7

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,707    .7429426    .0036801    .1520463    .7357246    .7501606
       1 |     684    .6384664    .0070231    .1836789    .6246768    .6522559
---------+--------------------------------------------------------------------
Combined |   2,391    .7130548    .0034448    .1684444    .7062996    .7198099
---------+--------------------------------------------------------------------
    diff |            .1044762    .0079289                .0889184    .1200341
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  13.1766
H0: diff = 0                     Satterthwaite's degrees of freedom =  1077.05

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,668    16.56933    .0352953    1.441501     16.5001    16.63856
       1 |     660    16.10463    .0545648    1.401794    15.99749    16.21178
---------+--------------------------------------------------------------------
Combined |   2,328    16.43759    .0299552    1.445318    16.37885    16.49633
---------+--------------------------------------------------------------------
    diff |            .4646958    .0649852                .3372028    .5921889
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   7.1508
H0: diff = 0                     Satterthwaite's degrees of freedom =  1240.02

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,707    2008.137    .1718213    7.098946      2007.8    2008.474
       1 |     684    2002.297    .3838312    10.03849    2001.543     2003.05
---------+--------------------------------------------------------------------
Combined |   2,391    2006.466    .1732164    8.469908    2006.127    2006.806
---------+--------------------------------------------------------------------
    diff |            5.840299    .4205341                5.015036    6.665562
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  13.8878
H0: diff = 0                     Satterthwaite's degrees of freedom =  968.586

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,707    .5122852    .0052512    .2169568    .5019858    .5225846
       1 |     684    .5601668    .0091633    .2396517    .5421751    .5781584
---------+--------------------------------------------------------------------
Combined |   2,391    .5259828    .0045949    .2246784    .5169725    .5349931
---------+--------------------------------------------------------------------
    diff |           -.0478816    .0105613                -.068603   -.0271601
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -4.5337
H0: diff = 0                     Satterthwaite's degrees of freedom =  1155.37

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,707    .2565905    .0105741    .4368794    .2358509    .2773301
       1 |     684    .3654971    .0184267    .4819217    .3293172    .4016769
---------+--------------------------------------------------------------------
Combined |   2,391    .2877457    .0092603    .4528067    .2695867    .3059047
---------+--------------------------------------------------------------------
    diff |           -.1089066    .0212452               -.1505899   -.0672232
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -5.1262
H0: diff = 0                     Satterthwaite's degrees of freedom =  1156.67

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

.          
.                 * Sample *
.                 qui reg v2x_polyarchy ld ivdem

.                 sum v2x_polyarchy $ldv year if e(sample)==1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
v2x_polyar~y |      2,391    .7045332    .1722022       .161       .919
        year |      2,391    2006.466    8.469908       1991       2020

.                 sum v2x_polyarchy $ldv year  

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
v2x_polyar~y |      2,391    .7045332    .1722022       .161       .919
        year |      2,391    2006.466    8.469908       1991       2020

.                 
.                 
.                 *********************
.                 ** Civil liberites **
.                 *********************
.                 qui reg v2x_polyarchy  create ld  if persparty~=.

.                         gen sample = e(sample)==1

.                         egen c=count(year) if e(sample)==1,by(lid)      

.                         hist c
(bin=33, start=1, width=.42424242)

.                         gen election = v2xel_elecparl==1 | v2xel_elecpres==1

.                         tsset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.                         gen f1election  =f.election
(132 missing values generated)

.                         gen l1election  =l.election
(132 missing values generated)

.                         
.                 local var = "v2x_clpol v2x_clpriv v2x_clphy frepress"

.                 foreach v of local var {
  2.                          qui gen o`v'=(l1`v') if minyr==year
  3.                          qui egen i`v'=max(o`v'),by(lid)
  4.                 }

.                 * flip scales to measure more repression and  * v2x_clphy already
>  flipped; v2caviol measures more violence
.                 local var = "v2x_clpol v2x_clpriv"

.                 foreach v of local var {
  2.                         replace `v'=`v'*-1
  3.                 }
(2,391 real changes made)
(2,391 real changes made)

.                 * rescale rescale on 0,1 *
.                 local var = "v2x_clpol v2x_clpriv v2x_clphy frepress"

.                 foreach v of local var {
  2.                         qui sum `v'
  3.                         replace `v'=`v'+abs(r(min))
  4.                         qui sum `v'
  5.                         replace `v'=`v'/r(max)
  6.                 }
(2,391 real changes made)
(2,367 real changes made)
(2,391 real changes made)
(2,389 real changes made)
(2,391 real changes made)
(2,391 real changes made)
(2,119 real changes made)
(2,118 real changes made)

.                 sum v2x_clpol v2x_clpriv v2x_clphy v2caviol

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   v2x_clpol |      2,391    .1442975     .136153          0          1
  v2x_clpriv |      2,391    .1698332    .1674123          0          1
   v2x_clphy |      2,391     .206133    .2075551   .0251429          1
    v2caviol |      2,359   -.7693951    1.412314     -3.625      3.643

.                 corr v2x_clpol v2x_clpriv v2x_clphy v2caviol
(obs=2,359)

             | v2x_cl~l v2x_cl~v v2x_cl~y v2caviol
-------------+------------------------------------
   v2x_clpol |   1.0000
  v2x_clpriv |   0.7683   1.0000
   v2x_clphy |   0.7746   0.7865   1.0000
    v2caviol |   0.5680   0.6513   0.6811   1.0000


.                 swilk v2x_clpol v2x_clpriv v2x_clphy v2caviol

                   Shapiro–Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
   v2x_clpol |      2,391    0.85584    201.086    13.579    0.00000
  v2x_clpriv |      2,391    0.83173    234.714    13.975    0.00000
   v2x_clphy |      2,391    0.80994    265.109    14.286    0.00000
    v2caviol |      2,359    0.96425     49.267     9.973    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.

.                 
.                 local var = "v2x_clpol v2x_clpriv"

.                 foreach v of local var {
  2.                         replace `v'=`v'^(1/3)
  3.                         qui sum `v'
  4.                         replace `v'=(`v'-r(mean))/r(sd)
  5.                 }       
(2,366 real changes made)
(2,391 real changes made)
(2,388 real changes made)
(2,391 real changes made)

.                 local var = "v2x_clphy"

.                 foreach v of local var {
  2.                         replace `v'=`v'^(1/12)
  3.                         qui sum `v'
  4.                         replace `v'=(`v'-r(mean))/r(sd)
  5.                 }       
(2,390 real changes made)
(2,391 real changes made)

.                 local var = "frepress"

.                 foreach v of local var {
  2.                 qui sum `v'
  3.                         replace `v'=(`v'-r(mean))/r(sd)
  4.                 }
(2,119 real changes made)

.                 swilk v2x_clpol v2x_clpriv v2x_clphy frepress

                   Shapiro–Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
   v2x_clpol |      2,391    0.98424     21.981     7.911    0.00000
  v2x_clpriv |      2,391    0.98326     23.349     8.066    0.00000
   v2x_clphy |      2,391    0.94720     73.656    11.007    0.00000
    frepress |      2,119    0.99134     10.824     6.071    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.

.                 sum v2x_clpol v2x_clpriv v2x_clphy frepress

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   v2x_clpol |      2,391   -2.26e-16           1  -2.774866   3.132601
  v2x_clpriv |      2,391    2.47e-16           1  -2.792711   2.844713
   v2x_clphy |      2,391    5.18e-16           1  -1.492028   2.153701
    frepress |      2,119   -5.02e-10           1   -2.84641   2.131335

.                 
. 
. 
.                   * Differenced Lag DV *
.                   reghdfe d.v2x_clpol persparty ld ivdem l1v2x_clpol l2v2x_clpol 
> time,a(cowcode)cluster(lid) 
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,255
Absorbing 1 HDFE group                            F(   6,    565) =      13.14
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1148
                                                  Adj R-squared   =     0.0716
                                                  Within R-sq.    =     0.0672
Number of clusters (lid)     =        566         Root MSE        =     0.1634

                                  (Std. err. adjusted for 566 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
 D.v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0850934   .0280311     3.04   0.003     .0300356    .1401513
          ld |   .0266541   .0146224     1.82   0.069    -.0020668    .0553751
       ivdem |  -.2628084   .1572361    -1.67   0.095    -.5716472    .0460303
 l1v2x_clpol |  -.1990576   .2409716    -0.83   0.409     -.672367    .2742519
 l2v2x_clpol |   .9563187   .2126701     4.50   0.000     .5385981    1.374039
        time |    .002375   .0008794     2.70   0.007     .0006476    .0041023
       _cons |  -.6277309   .1227352    -5.11   0.000    -.8688039   -.3866579
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       100           0         100     |
-----------------------------------------------------+

.                             qui xtreg d.v2x_clpol time persparty ld ivdem l1v2x_c
> lpol l2v2x_clpol,i(cowcode)fe cluster(cowcode) 

.                             qui predict e_residuals_1, e

.                                 xtistest e_res, lags(2)

Inoue and Solon (2006) LM-test on variables e_residuals_1
Panelvar: cowcode
Timevar: year
p (lags): 2
-----------------------------------------------------------------------------------
> ---+
           Variable           |  IS-stat    p-value   |      N    maxT |   balance?
>    |
------------------------------+-----------------------+----------------+-----------
> ---|
        e_residuals_1         +   68.13      0.110    +    103      29 +  unbalance
> d  |
-----------------------------------------------------------------------------------
> ---+
 Notes: Under H0, LM ~ chi2(p*T-p(p+1)/2)
    H0: No auto-correlation of any order.
    Ha: Auto-correlation up to order 2.

.                                 drop e_res

.                   * FE with initial level *
.                    reghdfe v2x_clpol persparty ld ivdem iv2x_clpol time,a(cowcode
> )cluster(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,333
Absorbing 1 HDFE group                            F(   5,    573) =      34.57
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9196
                                                  Adj R-squared   =     0.9158
                                                  Within R-sq.    =     0.3324
Number of clusters (lid)     =        574         Root MSE        =     0.2900

                                  (Std. err. adjusted for 574 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .2187963   .0842997     2.60   0.010     .0532223    .3843704
          ld |   .0864082   .0407379     2.12   0.034     .0063945     .166422
       ivdem |  -2.475591   .3531427    -7.01   0.000    -3.169203   -1.781979
  iv2x_clpol |  -2.042718   .3095308    -6.60   0.000    -2.650671   -1.434764
        time |   .0106865   .0022276     4.80   0.000     .0063112    .0150617
       _cons |   2.989264   .2609469    11.46   0.000     2.476735    3.501793
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       101           0         101     |
-----------------------------------------------------+

.                             qui xtreg v2x_clpol time persparty ld ivdem iv2x_clpo
> l,cluster(cowcode)fe

.                             qui predict e_residuals_1, e

.                                 xtistest e_res, lags(2)

Inoue and Solon (2006) LM-test on variables e_residuals_1
Panelvar: cowcode
Timevar: year
p (lags): 2
-----------------------------------------------------------------------------------
> ---+
           Variable           |  IS-stat    p-value   |      N    maxT |   balance?
>    |
------------------------------+-----------------------+----------------+-----------
> ---|
        e_residuals_1         +   71.58      0.093    +    104      30 +     gaps  
>    |
-----------------------------------------------------------------------------------
> ---+
 Notes: Under H0, LM ~ chi2(p*T-p(p+1)/2)
    H0: No auto-correlation of any order.
    Ha: Auto-correlation up to order 2.

.                                 drop e_res

.                   * Rescale to get estimates that fit scale of treatment -- only 
> for visualizing coefficient estimates 
.                         replace ivdem = ivdem*10
(2,391 real changes made)

.                         replace ipi = ipi*10
(2,320 real changes made)

.                         replace l1v2x_clpol=l1v2x_clpol*50
(2,390 real changes made)

.                         replace l2v2x_clpol=l2v2x_clpol*50
(2,385 real changes made)

.                 
.                   * Dynamic panel baseline model *
.                    reghdfe v2x_clpol persparty ld ivdem l1v2x_clpol l2v2x_clpol,a
> (cowcode)cluster(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,382
Absorbing 1 HDFE group                            F(   5,    586) =     138.76
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9571
                                                  Adj R-squared   =     0.9551
                                                  Within R-sq.    =     0.6444
Number of clusters (lid)     =        587         Root MSE        =     0.2112

                                  (Std. err. adjusted for 587 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .1384161   .0523255     2.65   0.008     .0356477    .2411845
          ld |   .1092268   .0173394     6.30   0.000     .0751719    .1432817
       ivdem |  -.0747441   .0196301    -3.81   0.000     -.113298   -.0361903
 l1v2x_clpol |  -.1177568   .0063886   -18.43   0.000    -.1303041   -.1052096
 l2v2x_clpol |   .0107238   .0033542     3.20   0.001     .0041361    .0173116
       _cons |   4.805804   .2144055    22.41   0.000     4.384707      5.2269
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
-----------------------------------------------------+

.                    est store civlib1

.                                 qui xtreg v2x_clpol time persparty ld ivdem l1v2x
> _clpol l2v2x_clpol,cluster(cowcode)fe

.                                 qui predict e_residuals_1, e

.                                 xtistest e_res, lags(2)

Inoue and Solon (2006) LM-test on variables e_residuals_1
Panelvar: cowcode
Timevar: year
p (lags): 2
-----------------------------------------------------------------------------------
> ---+
           Variable           |  IS-stat    p-value   |      N    maxT |   balance?
>    |
------------------------------+-----------------------+----------------+-----------
> ---|
        e_residuals_1         +   67.85      0.154    +    106      30 +     gaps  
>    |
-----------------------------------------------------------------------------------
> ---+
 Notes: Under H0, LM ~ chi2(p*T-p(p+1)/2)
    H0: No auto-correlation of any order.
    Ha: Auto-correlation up to order 2.

.                                 drop e_res      

.                                 
.                         gen newparty  =(partyage^(1/2))*-1

.                         qui sum newparty

.                         replace newparty = newparty +abs(r(min))
(2,391 real changes made)

.                         qui sum newparty 

.                         replace newparty = newparty/r(max)
(2,390 real changes made)

.                         sum newparty

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
    newparty |      2,391    .6095077     .248628          0          1

.                         hist newparty
(bin=33, start=0, width=.03030303)

.                         swilk newparty lnparty partyage

                   Shapiro–Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
    newparty |      2,391    0.97124     40.119     9.452    0.00000
  lnpartyage |      2,391    0.95908     57.079    10.355    0.00000
    partyage |      2,391    0.84674    213.777    13.735    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.

.                         
.                         reghdfe v2x_clpol persparty time ld ivdem newparty l1v2x_
> clpol l2v2x_clpol,a(cowcode)cluster(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,382
Absorbing 1 HDFE group                            F(   7,    586) =     100.27
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9578
                                                  Adj R-squared   =     0.9558
                                                  Within R-sq.    =     0.6501
Number of clusters (lid)     =        587         Root MSE        =     0.2096

                                  (Std. err. adjusted for 587 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .1456705   .0688561     2.12   0.035     .0104357    .2809054
        time |   .0047006   .0013788     3.41   0.001     .0019925    .0074086
          ld |   .0560589   .0221838     2.53   0.012     .0124895    .0996283
       ivdem |  -.0823561   .0201241    -4.09   0.000    -.1218802    -.042832
    newparty |  -.0179146   .0632353    -0.28   0.777    -.1421101    .1062809
 l1v2x_clpol |  -.1168639   .0063762   -18.33   0.000    -.1293869   -.1043409
 l2v2x_clpol |   .0118571   .0034077     3.48   0.001     .0051643    .0185499
       _cons |   4.862277   .2159221    22.52   0.000     4.438202    5.286352
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
-----------------------------------------------------+

.                         est store civlib2

.                         reghdfe v2x_clpol persparty time ld ivdem ipi l1v2x_clpol
>  l2v2x_clpol,a(cowcode)cluster(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,315
Absorbing 1 HDFE group                            F(   7,    570) =     107.04
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9568
                                                  Adj R-squared   =     0.9548
                                                  Within R-sq.    =     0.6433
Number of clusters (lid)     =        571         Root MSE        =     0.2110

                                  (Std. err. adjusted for 571 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .1387902   .0522713     2.66   0.008     .0361223    .2414582
        time |   .0051927   .0014923     3.48   0.001     .0022617    .0081237
          ld |   .0502721   .0241431     2.08   0.038     .0028518    .0976924
       ivdem |  -.0805835   .0217004    -3.71   0.000     -.123206   -.0379611
         ipi |  -.0048314   .0200865    -0.24   0.810    -.0442841    .0346212
 l1v2x_clpol |  -.1165418   .0066798   -17.45   0.000    -.1296618   -.1034218
 l2v2x_clpol |   .0117003   .0035572     3.29   0.001     .0047135    .0186871
       _cons |    4.87443   .2295949    21.23   0.000     4.423474    5.325385
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       100           0         100     |
-----------------------------------------------------+

.                         est store civlib3

.                         reghdfe v2x_clpol persparty time ld ivdem i_popul l1v2x_c
> lpol l2v2x_clpol,a(cowcode)cluster(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,296
Absorbing 1 HDFE group                            F(   7,    556) =      91.31
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9577
                                                  Adj R-squared   =     0.9557
                                                  Within R-sq.    =     0.6538
Number of clusters (lid)     =        557         Root MSE        =     0.2084

                                  (Std. err. adjusted for 557 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .1217904   .0546022     2.23   0.026     .0145386    .2290423
        time |   .0052663   .0014091     3.74   0.000     .0024986    .0080341
          ld |   .0499497   .0225697     2.21   0.027     .0056173    .0942821
       ivdem |  -.0911056   .0216407    -4.21   0.000    -.1336131   -.0485981
  i_populism |   .0341323   .0391954     0.87   0.384     -.042857    .1111215
 l1v2x_clpol |  -.1176294   .0066961   -17.57   0.000    -.1307823   -.1044766
 l2v2x_clpol |   .0124631   .0038041     3.28   0.001      .004991    .0199352
       _cons |   4.920083   .2240352    21.96   0.000     4.480024    5.360142
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       101           0         101     |
-----------------------------------------------------+

.                         est store civlib4

.                     reghdfe v2x_clpol persparty time ld ivdem l1v2x_clpol l2v2x_c
> lpol if year<2020,a(cowcode)cluster(lid)
(dropped 4 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,293
Absorbing 1 HDFE group                            F(   6,    568) =     113.39
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9604
                                                  Adj R-squared   =     0.9584
                                                  Within R-sq.    =     0.6559
Number of clusters (lid)     =        569         Root MSE        =     0.2033

                                  (Std. err. adjusted for 569 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .1132294   .0505614     2.24   0.026     .0139193    .2125396
        time |   .0039793   .0013718     2.90   0.004     .0012847    .0066738
          ld |   .0583958   .0220449     2.65   0.008     .0150963    .1016953
       ivdem |  -.0782864   .0202762    -3.86   0.000    -.1181118   -.0384609
 l1v2x_clpol |  -.1168376   .0064369   -18.15   0.000    -.1294807   -.1041946
 l2v2x_clpol |    .011414     .00342     3.34   0.001     .0046966    .0181315
       _cons |   4.858235   .2152167    22.57   0.000     4.435518    5.280953
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       102           0         102     |
-----------------------------------------------------+

. 
.                         label var persparty "{bf:Party personalism}"

.                         label var ld "Democracy age"

.                         label var ivdem `""Initial democracy" "level          ""'

.                         label var newparty "New parties index"

.                         label var ipi `""Initial party     " "institutionalizatio
> n""'

.                         label var i_popul "Party populism"

.                         coefplot (civlib1, msymbol(d))(civlib2, msymbol(P)) (civl
> ib3, msymbol(T)) (civlib4, msymbol(Oh)), order(persparty)  ///
>                                 drop(_cons l1v2x_clpol l2v2x_clpol time) xline(0)
>  msymbol(d) mfcolor(white) grid(glcolor(gs15)) ///
>                                 levels(95 90) legend(lab(3 "Baseline")lab(6 "+ Ne
> w party index") ///
>                                 lab(9 "+ Initial party institutionalization")lab(
> 12 "+ Party populism")  order(3 6 9 12) ///
>                                 size(small) pos(6) col(2) ring(1)) xsize(2) ysize
> (2) xlab(-.2(.1).3)  ///
>                                 xtitle("        Coefficient estimate", size(small
> ))  ///
>                                 ciopts(lwidth(thin)) aspectratio(1.1) scale(.75) 
> title(Government repression of civil liberties, size(medium) height(2))
(note:  named style P not found in class symbol, default attributes used)

.                         gr export "$dir\golden\Ch4-PersParty-Civliberties.pdf",as
> (pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h4-PersParty-Civliberties.pdf saved as PDF format

.                   
.                   * Create party * 
.                    reghdfe v2x_clpol create ld ivdem l1v2x_clpol l2v2x_clpol,a(co
> wcode year)cluster(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,382
Absorbing 2 HDFE groups                           F(   5,    586) =     140.11
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9592
                                                  Adj R-squared   =     0.9567
                                                  Within R-sq.    =     0.6369
Number of clusters (lid)     =        587         Root MSE        =     0.2073

                                  (Std. err. adjusted for 587 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      create |   .0500594   .0236517     2.12   0.035      .003607    .0965117
          ld |   .0604769    .022381     2.70   0.007     .0165202    .1044336
       ivdem |  -.0801687    .019378    -4.14   0.000    -.1182275   -.0421098
 l1v2x_clpol |  -.1164794   .0061962   -18.80   0.000    -.1286489   -.1043099
 l2v2x_clpol |   .0132787   .0032657     4.07   0.000     .0068648    .0196926
       _cons |   4.883654   .2093181    23.33   0.000     4.472549    5.294759
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
        year |        30           1          29     |
-----------------------------------------------------+

.                    est store c1

.                    
.                    * IFE *
.                         regife v2x_clpol persparty ld ivdem l1v2x_clpol l2v2x_clp
> ol,a(cowcode year)ife(cowcode year,1)vce(cluster lid)

REGIFE                                            Number of obs   =       2382
Panel structure: cowcode, year                    F(   5,    586) =      81.26
Factor dimension: 1                               Prob > F        =     0.0000
Converged: true                                   Root MSE        =     0.1771
                                                  Iterations      =        242
------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .1596548   .0431111     3.70   0.000     .0749837    .2443259
          ld |   .0812821   .0255542     3.18   0.002     .0310932     .131471
       ivdem |  -.0922137   .0267868    -3.44   0.001    -.1448236   -.0396039
 l1v2x_clpol |  -.0973873   .0070097   -13.89   0.000    -.1111546   -.0836201
 l2v2x_clpol |   .0119528   .0031831     3.76   0.000     .0057012    .0182045
       _cons |   4.060734   .2519217    16.12   0.000     3.565954    4.555513
------------------------------------------------------------------------------

.                         est store ife1

.                         regife v2x_clpol persparty ld ivdem l1v2x_clpol l2v2x_clp
> ol,a(cowcode year)ife(cowcode year,2)vce(cluster lid)  
The algorithm did not converge : convergence error is 2.3e-07 (tolerance 1.0e-09)
Allow for more iterations with the option maxiter

REGIFE                                            Number of obs   =       2382
Panel structure: cowcode, year                    F(   5,    586) =      57.64
Factor dimension: 2                               Prob > F        =     0.0000
Converged: false                                  Root MSE        =     0.1565
                                                  Iterations      =      10000
------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .1659323   .0408789     4.06   0.000     .0856453    .2462194
          ld |   .1169355   .0340998     3.43   0.001     .0499628    .1839083
       ivdem |  -.1170426   .0316112    -3.70   0.000    -.1791276   -.0549576
 l1v2x_clpol |  -.0809851   .0078209   -10.35   0.000    -.0963454   -.0656247
 l2v2x_clpol |   .0094024   .0029817     3.15   0.002     .0035463    .0152585
       _cons |   3.520986   .2996934    11.75   0.000     2.932382     4.10959
------------------------------------------------------------------------------

.                         est store ife2

.                         label var l1v2x_clpol  `""Civil     " "liberties{sub:t-1}
> ""'

.                         label var l2v2x_clpol `""Civil     " "liberties{sub:t-2}"
> "'

.                         label var create   `""Create" "Party ""'

.                         coefplot (civlib1, msymbol(d))(c1, msymbol(P)) (ife1, msy
> mbol(T)) (ife2, msymbol(Oh)), order(persparty create)  ///
>                                 drop(_cons  time) xline(0) msymbol(d) mfcolor(whi
> te) grid(glcolor(gs15)) ///
>                                 levels(95 90) legend(lab(3 "Party personalism, dy
> namic panel")lab(6 "Create party, dynamic panel") ///
>                                 lab(9 "IFE, 1")lab(12 "IFE, 2")  order(3 6 9 12) 
> ///
>                                 size(small) pos(6) col(2) ring(1)) xsize(2) ysize
> (2) xlab(-.2(.1).3)  ///
>                                 xtitle("        Coefficient estimate", size(small
> ))  ///
>                                 ciopts(lwidth(thin)) aspectratio(1.1) scale(.75) 
> title(Government repression of civil liberties, size(medium) height(2))
(note:  named style P not found in class symbol, default attributes used)

.                         gr export "$dir\golden\T-Civlib-Robust.pdf",as(pdf)replac
> e 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -Civlib-Robust.pdf saved as PDF format

.                                 
.                    * Check dynamic panel estimate against confounders *
.                     global d = "persparty"

.                         gen beta=.
(2,391 missing values generated)

.                         gen hi90=.
(2,391 missing values generated)

.                         gen lo90=.
(2,391 missing values generated)

.                         gen n =_n

.                         gen hi=.
(2,391 missing values generated)

.                         gen lo=.
(2,391 missing values generated)

.                         gen varname = " "

.                         local i =1

.                         local var = "l1v2xps_party ipi i_popu election i.v2elparl
> el v2pavote v2paseats ipolar isupdem priormil pres econcrisis gdp lpop oilgas"

.                         foreach v of local var {
  2.                                 di "`v'"
  3.                                 xtset lid year
  4.                                 reghdfe v2x_clpol `v' persparty time ld ivdem 
> l1v2x_clpol l2v2x_clpol,a(cowcode)cluster(lid) 
  5.                                 lincom $d
  6.                                 qui nlcom _b[$d],post
  7.                                 matrix beta =e(b)  
  8.                                 local b = beta[1,1]
  9.                                 qui replace beta=`b' if n==`i'
 10.                                 matrix var = e(V) 
 11.                                 local se =var[1,1]
 12.                                 qui replace hi = `b' + sqrt(`se')*1.96 if n==`
> i'
 13.                                 qui replace lo = `b' - sqrt(`se')*1.96 if n==`
> i'
 14.                                 qui replace hi90 = `b' + sqrt(`se')*1.645 if n
> ==`i'
 15.                                 qui replace lo90 = `b' - sqrt(`se')*1.645 if n
> ==`i'
 16.                                 qui replace varname = "`v'" if n==`i'
 17.                                 local i = `i' +1
 18.                          }
l1v2xps_party

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,372
Absorbing 1 HDFE group                            F(   7,    586) =     100.16
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9579
                                                  Adj R-squared   =     0.9559
                                                  Within R-sq.    =     0.6511
Number of clusters (lid)     =        587         Root MSE        =     0.2092

                                   (Std. err. adjusted for 587 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
    v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
l1v2xps_party |  -.2946098   .2101095    -1.40   0.161    -.7072691    .1180495
    persparty |   .1351481   .0518067     2.61   0.009     .0333986    .2368976
         time |   .0049114   .0014206     3.46   0.001     .0021212    .0077015
           ld |   .0584171   .0222899     2.62   0.009     .0146393     .102195
        ivdem |  -.0793009   .0209332    -3.79   0.000    -.1204142   -.0381876
  l1v2x_clpol |  -.1169743   .0063924   -18.30   0.000    -.1295292   -.1044194
  l2v2x_clpol |   .0118386   .0034483     3.43   0.001      .005066    .0186111
        _cons |   5.039387   .2373277    21.23   0.000      4.57327    5.505503
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1351481   .0518067     2.61   0.009     .0333986    .2368976
------------------------------------------------------------------------------
ipi

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,315
Absorbing 1 HDFE group                            F(   7,    570) =     107.04
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9568
                                                  Adj R-squared   =     0.9548
                                                  Within R-sq.    =     0.6433
Number of clusters (lid)     =        571         Root MSE        =     0.2110

                                  (Std. err. adjusted for 571 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         ipi |  -.0048314   .0200865    -0.24   0.810    -.0442841    .0346212
   persparty |   .1387902   .0522713     2.66   0.008     .0361223    .2414582
        time |   .0051927   .0014923     3.48   0.001     .0022617    .0081237
          ld |   .0502721   .0241431     2.08   0.038     .0028518    .0976924
       ivdem |  -.0805835   .0217004    -3.71   0.000     -.123206   -.0379611
 l1v2x_clpol |  -.1165418   .0066798   -17.45   0.000    -.1296618   -.1034218
 l2v2x_clpol |   .0117003   .0035572     3.29   0.001     .0047135    .0186871
       _cons |    4.87443   .2295949    21.23   0.000     4.423474    5.325385
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       100           0         100     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1387902   .0522713     2.66   0.008     .0361223    .2414582
------------------------------------------------------------------------------
i_popu

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,296
Absorbing 1 HDFE group                            F(   7,    556) =      91.31
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9577
                                                  Adj R-squared   =     0.9557
                                                  Within R-sq.    =     0.6538
Number of clusters (lid)     =        557         Root MSE        =     0.2084

                                  (Std. err. adjusted for 557 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
  i_populism |   .0341323   .0391954     0.87   0.384     -.042857    .1111215
   persparty |   .1217904   .0546022     2.23   0.026     .0145386    .2290423
        time |   .0052663   .0014091     3.74   0.000     .0024986    .0080341
          ld |   .0499497   .0225697     2.21   0.027     .0056173    .0942821
       ivdem |  -.0911056   .0216407    -4.21   0.000    -.1336131   -.0485981
 l1v2x_clpol |  -.1176294   .0066961   -17.57   0.000    -.1307823   -.1044766
 l2v2x_clpol |   .0124631   .0038041     3.28   0.001      .004991    .0199352
       _cons |   4.920083   .2240352    21.96   0.000     4.480024    5.360142
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       101           0         101     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1217904   .0546022     2.23   0.026     .0145386    .2290423
------------------------------------------------------------------------------
election

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,382
Absorbing 1 HDFE group                            F(   7,    586) =      99.44
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9578
                                                  Adj R-squared   =     0.9558
                                                  Within R-sq.    =     0.6501
Number of clusters (lid)     =        587         Root MSE        =     0.2096

                                  (Std. err. adjusted for 587 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    election |   .0056589   .0089117     0.63   0.526    -.0118439    .0231617
   persparty |   .1353477   .0513526     2.64   0.009     .0344901    .2362052
        time |   .0047285   .0013747     3.44   0.001     .0020284    .0074285
          ld |   .0558411    .022192     2.52   0.012     .0122555    .0994266
       ivdem |   -.082171   .0201195    -4.08   0.000    -.1216861    -.042656
 l1v2x_clpol |  -.1168753   .0063787   -18.32   0.000    -.1294033   -.1043473
 l2v2x_clpol |   .0118282   .0034032     3.48   0.001     .0051442    .0185122
       _cons |   4.855667   .2143729    22.65   0.000     4.434635      5.2767
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1353477   .0513526     2.64   0.009     .0344901    .2362052
------------------------------------------------------------------------------
i.v2elparlel

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,382
Absorbing 1 HDFE group                            F(   9,    586) =      83.40
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9580
                                                  Adj R-squared   =     0.9559
                                                  Within R-sq.    =     0.6516
Number of clusters (lid)     =        587         Root MSE        =     0.2092

                                  (Std. err. adjusted for 587 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
  v2elparlel |
          1  |   .0016183    .040973     0.04   0.969    -.0788536    .0820902
          2  |  -.0703498   .0365926    -1.92   0.055    -.1422185    .0015189
          3  |  -.0359504   .0468077    -0.77   0.443    -.1278818     .055981
             |
   persparty |   .1476901   .0521093     2.83   0.005     .0453463    .2500339
        time |   .0050467    .001387     3.64   0.000     .0023227    .0077708
          ld |    .056484   .0221747     2.55   0.011     .0129325    .1000355
       ivdem |  -.0855669   .0202543    -4.22   0.000    -.1253467   -.0457871
 l1v2x_clpol |  -.1174783   .0064419   -18.24   0.000    -.1301304   -.1048262
 l2v2x_clpol |   .0117784   .0033638     3.50   0.000     .0051719     .018385
       _cons |   4.910986   .2171509    22.62   0.000     4.484497    5.337474
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1476901   .0521093     2.83   0.005     .0453463    .2500339
------------------------------------------------------------------------------
v2pavote

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      1,930
Absorbing 1 HDFE group                            F(   7,    489) =      85.97
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9596
                                                  Adj R-squared   =     0.9574
                                                  Within R-sq.    =     0.6413
Number of clusters (lid)     =        490         Root MSE        =     0.2039

                                  (Std. err. adjusted for 490 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    v2pavote |   .0008023   .0007262     1.10   0.270    -.0006245    .0022291
   persparty |   .0983002   .0562761     1.75   0.081    -.0122726     .208873
        time |   .0055133   .0016479     3.35   0.001     .0022754    .0087512
          ld |   .0327454   .0264861     1.24   0.217    -.0192952    .0847861
       ivdem |  -.0922778   .0259239    -3.56   0.000    -.1432137   -.0413418
 l1v2x_clpol |  -.1197727   .0075962   -15.77   0.000    -.1346979   -.1048475
 l2v2x_clpol |   .0131424   .0038423     3.42   0.001      .005593    .0206918
       _cons |   4.997716   .2626728    19.03   0.000     4.481609    5.513823
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        92           0          92     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0983002   .0562761     1.75   0.081    -.0122726     .208873
------------------------------------------------------------------------------
v2paseats

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,208
Absorbing 1 HDFE group                            F(   7,    536) =      90.94
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9579
                                                  Adj R-squared   =     0.9558
                                                  Within R-sq.    =     0.6481
Number of clusters (lid)     =        537         Root MSE        =     0.2080

                                   (Std. err. adjusted for 537 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
    v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
v2paseatshare |   .0011286    .000489     2.31   0.021      .000168    .0020892
    persparty |   .1352738   .0543496     2.49   0.013     .0285094    .2420382
         time |    .005641   .0014933     3.78   0.000     .0027077    .0085744
           ld |    .049616   .0234337     2.12   0.035     .0035828    .0956491
        ivdem |  -.0951477    .021065    -4.52   0.000    -.1365277   -.0537676
  l1v2x_clpol |  -.1153517   .0071519   -16.13   0.000     -.129401   -.1013025
  l2v2x_clpol |     .01138   .0036399     3.13   0.002     .0042298    .0185303
        _cons |    4.84474   .2421409    20.01   0.000     4.369079    5.320402
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       101           0         101     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1352738   .0543496     2.49   0.013     .0285094    .2420382
------------------------------------------------------------------------------
ipolar

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 2 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,307
Absorbing 1 HDFE group                            F(   7,    566) =     117.64
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9584
                                                  Adj R-squared   =     0.9564
                                                  Within R-sq.    =     0.6529
Number of clusters (lid)     =        567         Root MSE        =     0.2092

                                  (Std. err. adjusted for 567 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      ipolar |   .0704172   .0250204     2.81   0.005      .021273    .1195614
   persparty |   .1289984   .0499664     2.58   0.010     .0308562    .2271407
        time |   .0029626   .0015458     1.92   0.056    -.0000736    .0059989
          ld |   .0703881   .0262269     2.68   0.007     .0188741    .1219021
       ivdem |  -.0656824   .0212083    -3.10   0.002    -.1073391   -.0240258
 l1v2x_clpol |  -.1144889   .0063552   -18.01   0.000    -.1269716   -.1020062
 l2v2x_clpol |   .0115413   .0034873     3.31   0.001     .0046916    .0183909
       _cons |    4.66846   .2099828    22.23   0.000     4.256019      5.0809
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       100           0         100     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1289984   .0499664     2.58   0.010     .0308562    .2271407
------------------------------------------------------------------------------
isupdem

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 1 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      1,704
Absorbing 1 HDFE group                            F(   7,    388) =      77.09
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9619
                                                  Adj R-squared   =     0.9596
                                                  Within R-sq.    =     0.6455
Number of clusters (lid)     =        389         Root MSE        =     0.1970

                                  (Std. err. adjusted for 389 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     isupdem |  -.0134144   .0288666    -0.46   0.642    -.0701691    .0433402
   persparty |   .0944689   .0719619     1.31   0.190    -.0470152     .235953
        time |   .0061233   .0019306     3.17   0.002     .0023276     .009919
          ld |   .0170379   .0291692     0.58   0.559    -.0403115    .0743874
       ivdem |  -.0440131   .0281746    -1.56   0.119    -.0994072    .0113809
 l1v2x_clpol |  -.1396072   .0092336   -15.12   0.000    -.1577615    -.121453
 l2v2x_clpol |   .0293527    .007351     3.99   0.000     .0148999    .0438055
       _cons |   4.877081   .2835088    17.20   0.000     4.319675    5.434487
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        88           0          88     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0944689   .0719619     1.31   0.190    -.0470152     .235953
------------------------------------------------------------------------------
priormil

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,382
Absorbing 1 HDFE group                            F(   7,    586) =     103.27
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9578
                                                  Adj R-squared   =     0.9558
                                                  Within R-sq.    =     0.6502
Number of clusters (lid)     =        587         Root MSE        =     0.2095

                                  (Std. err. adjusted for 587 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    priormil |   .0728262   .1488393     0.49   0.625    -.2194972    .3651496
   persparty |   .1365471   .0518587     2.63   0.009     .0346956    .2383986
        time |   .0047256   .0013693     3.45   0.001     .0020363    .0074149
          ld |   .0565933   .0222739     2.54   0.011     .0128468    .1003397
       ivdem |  -.0816476   .0197688    -4.13   0.000    -.1204739   -.0428212
 l1v2x_clpol |  -.1165871   .0063805   -18.27   0.000    -.1291186   -.1040556
 l2v2x_clpol |   .0118705    .003416     3.47   0.001     .0051613    .0185796
       _cons |   4.820024   .2188973    22.02   0.000     4.390105    5.249943
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1365471   .0518587     2.63   0.009     .0346956    .2383986
------------------------------------------------------------------------------
pres

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,382
Absorbing 1 HDFE group                            F(   7,    586) =      99.61
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9578
                                                  Adj R-squared   =     0.9558
                                                  Within R-sq.    =     0.6502
Number of clusters (lid)     =        587         Root MSE        =     0.2096

                                  (Std. err. adjusted for 587 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        pres |   .0592418   .0633377     0.94   0.350    -.0651547    .1836384
   persparty |   .1343098    .051383     2.61   0.009     .0333926     .235227
        time |   .0048193   .0013934     3.46   0.001     .0020826    .0075561
          ld |   .0550121    .022327     2.46   0.014     .0111614    .0988627
       ivdem |  -.0818975   .0201045    -4.07   0.000     -.121383   -.0424119
 l1v2x_clpol |  -.1168034   .0063795   -18.31   0.000    -.1293328   -.1042741
 l2v2x_clpol |   .0117768   .0034036     3.46   0.001     .0050921    .0184615
       _cons |   4.826347   .2170976    22.23   0.000     4.399963    5.252731
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1343098    .051383     2.61   0.009     .0333926     .235227
------------------------------------------------------------------------------
econcrisis

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,267
Absorbing 1 HDFE group                            F(   7,    557) =      87.15
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9577
                                                  Adj R-squared   =     0.9557
                                                  Within R-sq.    =     0.6404
Number of clusters (lid)     =        558         Root MSE        =     0.2114

                                  (Std. err. adjusted for 558 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
  econcrisis |   .0112591   .0239494     0.47   0.638    -.0357832    .0583013
   persparty |   .1385526   .0524872     2.64   0.009     .0354557    .2416496
        time |   .0049658   .0014257     3.48   0.001     .0021654    .0077662
          ld |   .0622986   .0235722     2.64   0.008     .0159973    .1085999
       ivdem |  -.0988183   .0221481    -4.46   0.000    -.1423223   -.0553142
 l1v2x_clpol |  -.1187247   .0067046   -17.71   0.000    -.1318941   -.1055553
 l2v2x_clpol |   .0143767   .0039528     3.64   0.000     .0066124     .022141
       _cons |   4.912892   .2320993    21.17   0.000     4.456995    5.368789
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        99           0          99     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1385526   .0524872     2.64   0.009     .0354557    .2416496
------------------------------------------------------------------------------
gdp

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,274
Absorbing 1 HDFE group                            F(   7,    559) =      91.66
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9583
                                                  Adj R-squared   =     0.9563
                                                  Within R-sq.    =     0.6374
Number of clusters (lid)     =        560         Root MSE        =     0.2094

                                  (Std. err. adjusted for 560 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
       gdppc |  -2.922152   1.034031    -2.83   0.005    -4.953212   -.8910918
   persparty |   .1216818   .0537486     2.26   0.024     .0161079    .2272557
        time |   .0081587   .0018021     4.53   0.000     .0046189    .0116985
          ld |   .0589035    .023855     2.47   0.014     .0120471    .1057599
       ivdem |  -.0962708   .0222519    -4.33   0.000    -.1399783   -.0525633
 l1v2x_clpol |  -.1146154   .0068279   -16.79   0.000    -.1280269   -.1012039
 l2v2x_clpol |   .0115753   .0034742     3.33   0.001     .0047511    .0183994
       _cons |   5.099833   .2334091    21.85   0.000     4.641367    5.558299
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        98           0          98     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1216818   .0537486     2.26   0.024     .0161079    .2272557
------------------------------------------------------------------------------
lpop

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,320
Absorbing 1 HDFE group                            F(   7,    572) =     104.72
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9578
                                                  Adj R-squared   =     0.9558
                                                  Within R-sq.    =     0.6514
Number of clusters (lid)     =        573         Root MSE        =     0.2103

                                  (Std. err. adjusted for 573 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        lpop |   .0100193   .0872404     0.11   0.909    -.1613313      .18137
   persparty |   .1378834   .0525029     2.63   0.009     .0347614    .2410054
        time |   .0047023   .0017514     2.68   0.007     .0012623    .0081423
          ld |   .0582871   .0223321     2.61   0.009     .0144242      .10215
       ivdem |  -.0902583   .0216652    -4.17   0.000    -.1328114   -.0477052
 l1v2x_clpol |  -.1170556   .0065634   -17.83   0.000    -.1299468   -.1041643
 l2v2x_clpol |   .0124737   .0036187     3.45   0.001      .005366    .0195813
       _cons |   4.715711   1.482535     3.18   0.002     1.803835    7.627588
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        99           0          99     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1378834   .0525029     2.63   0.009     .0347614    .2410054
------------------------------------------------------------------------------
oilgas

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
(dropped 4 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,216
Absorbing 1 HDFE group                            F(   7,    548) =      85.49
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9605
                                                  Adj R-squared   =     0.9585
                                                  Within R-sq.    =     0.6513
Number of clusters (lid)     =        549         Root MSE        =     0.2037

                                    (Std. err. adjusted for 549 clusters in lid)
--------------------------------------------------------------------------------
               |               Robust
     v2x_clpol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
oilgasrentsgdp |  -.0154002   .0257593    -0.60   0.550    -.0659992    .0351989
     persparty |   .1175199   .0517615     2.27   0.024     .0158446    .2191951
          time |   .0040153   .0014237     2.82   0.005     .0012187    .0068118
            ld |   .0638315   .0231086     2.76   0.006     .0184393    .1092238
         ivdem |  -.0889736   .0224207    -3.97   0.000    -.1330146   -.0449327
   l1v2x_clpol |  -.1166394   .0067098   -17.38   0.000    -.1298194   -.1034594
   l2v2x_clpol |   .0117284   .0036585     3.21   0.001     .0045421    .0189148
         _cons |   4.892198   .2278397    21.47   0.000     4.444652    5.339744
--------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        98           0          98     |
-----------------------------------------------------+

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1175199   .0517615     2.27   0.024     .0158446    .2191951
------------------------------------------------------------------------------

.                         label define varlab  1 "Party instit." 2 "Initial party i
> nst." 3 "Populism" ///
>                                 4 "Election" 5 "Electoral system" 6 `""Ruling par
> ty" "leg. seat share""' ///
>                                 7 `""Ruling party" "vote share""' 8 "Polarization
> " 9 `""Citizen support" "for democracy""' 10 "Prior military" ///
>                                 11 "Presidential" 12 "Economic crisis" 13 "GDP pe
> r capita" 14 "Population" 15 "Oil rents",replace

.                         label values n varlab

.                         twoway (scatter beta n if n<=15,mcol(blue)yscale(range(-.
> 01 0.08))yline(.1170501,lcol(gs4)lpat(dash_dot))) ///
>                                 (rspike hi lo n if n<=15,lw(vthin)lcol(blue)ylab(
> 0(.1)0.2)) ///
>                                 (rspike hi90 lo90 n if n<=15,lcol(blue)lw(medium)
> ytitle("{&beta}{sub:Party personalism}", ///
>                                 size(large)height(4))tit(Civil liberties repressi
> on)subtit("Covariate adjustment, dynamic panel model",size(small))   ///
>                                 xtitle(Added covariate,height(-10))yline(0,lpat(d
> ash)lcol(red))xlab(1(1)15,valuelabel angle(90))legend(off) ///
>                                 note("Baseline covariates: Democracy age, initial
>  level of democracy and two lags of the outcome variable",  ///
>                                 size(vsmall)pos(6)))

.                         gr export "$dir\golden\T-Civlib-Covariates.pdf",as(pdf)re
> place 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -Civlib-Covariates.pdf saved as PDF format

.                         
.                         qui reghdfe v2x_clpol persparty time ld ivdem l1v2x_clpol
>  l2v2x_clpol,a(cowcode)cluster(lid) 

.                         lincom persparty

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |    .134907    .051357     2.63   0.009     .0340408    .2357732
------------------------------------------------------------------------------

.                         sum persparty isupdem if e(sample)==1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   persparty |      2,382    .5254696    .2248494          0          1
     isupdem |      1,704    .1160502    .9099265  -1.929226   2.731266

.                         qui reghdfe v2x_clpol persparty time ld ivdem l1v2x_clpol
>  l2v2x_clpol if isupdem~=.,a(cowcode)cluster(lid)

.                         lincom persparty

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0959682   .0719689     1.33   0.183    -.0455296    .2374659
------------------------------------------------------------------------------

.                         qui reghdfe v2x_clpol isupdem persparty time ld ivdem l1v
> 2x_clpol l2v2x_clpol if isupdem~=.,a(cowcode)cluster(lid) 

.                         lincom persparty

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   v2x_clpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0944689   .0719619     1.31   0.190    -.0470152     .235953
------------------------------------------------------------------------------

. 
.                         gen misssupdem = isupdem==.

.                         ttest gwf_back, by(misssupdem)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,707    .0087873    .0022596    .0933554    .0043556    .0132191
       1 |     684    .0292398    .0064466    .1686012    .0165822    .0418974
---------+--------------------------------------------------------------------
Combined |   2,391    .0146382    .0024566    .1201249    .0098208    .0194556
---------+--------------------------------------------------------------------
    diff |           -.0204524     .005421               -.0310828   -.0098221
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -3.7728
H0: diff = 0                                     Degrees of freedom =     2389

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0001         Pr(|T| > |t|) = 0.0002          Pr(T > t) = 0.9999

.                          
.                 *******************************         
.                 ** T-tests by party creation **
.                 *******************************         
.                         gen e=. 
(2,391 missing values generated)

.                         ttest v2x_poly,by(create)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,703    .7361298     .003995    .1648649    .7282941    .7439655
       1 |     688    .6263227    .0062904    .1649948     .613972    .6386733
---------+--------------------------------------------------------------------
Combined |   2,391    .7045332    .0035217    .1722022    .6976274    .7114391
---------+--------------------------------------------------------------------
    diff |            .1098071    .0074493                .0951994    .1244148
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  14.7406
H0: diff = 0                                     Degrees of freedom =     2389

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.96* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.96* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.96*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.96*`se2' if _n==2                  
>        
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit(Democr
> acy level)saving(h1.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(.5(.1).8)col(gs1)leg
> end(off)xtit("")tit(Democracy decay) ///
>                                 xlab(1 "No party creation" 2 "Leader creates part
> y")xscale(range(.8 2.2)))
(file h1.gph not found)
file h1.gph saved

.                         ttest decline10,by(create)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,703    .0240752    .0037155    .1533276    .0167878    .0313625
       1 |     688    .0872093    .0107644    .2823468    .0660743    .1083443
---------+--------------------------------------------------------------------
Combined |   2,391    .0422417    .0041143    .2011823    .0341737    .0503098
---------+--------------------------------------------------------------------
    diff |           -.0631341    .0089979               -.0807786   -.0454897
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -7.0166
H0: diff = 0                                     Degrees of freedom =     2389

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.96* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.96* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.96*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.96*`se2' if _n==2                  
>        
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit("Proba
> bility of democratic decline of 10 % or more")saving(h2.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.02).1)col(gs1)leg
> end(off)xtit("")tit(Democratic erosion) ///
>                                 xlab(1 "No party creation" 2 "Leader creates part
> y")xscale(range(.8 2.2)))
(file h2.gph not found)
file h2.gph saved

.                         ttest gwf_back,by(create)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,703    .0082208    .0021887    .0903216     .003928    .0125136
       1 |     688    .0305233    .0065631    .1721472    .0176372    .0434093
---------+--------------------------------------------------------------------
Combined |   2,391    .0146382    .0024566    .1201249    .0098208    .0194556
---------+--------------------------------------------------------------------
    diff |           -.0223025    .0054084               -.0329082   -.0116968
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -4.1236
H0: diff = 0                                     Degrees of freedom =     2389

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.95* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.95* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.95*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.95*`se2' if _n==2                  
>        
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit(Probab
> ility of democratic collapse)saving(h3.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.02).1)col(gs1)leg
> end(off)xtit("")tit(Democratic collapse) ///
>                                 xlab(1 "No party creation" 2 "Leader creates part
> y")xscale(range(.8 2.2)))
(file h3.gph not found)
file h3.gph saved

.                         gr combine h1.gph h2.gph h3.gph, xsize(4)ysize(2)col(3)

.                         gr export "$dir\golden\Ch4-Democracy-ttests.pdf",as(pdf)r
> eplace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h4-Democracy-ttests.pdf saved as PDF format

.          
.                         *** Initial support for democracy ***
.                         qui centile isupdem,centile(50)

.                         local c = r(c_1)

.                         tab gwf_back create if isupdem<`c'  & isupdem~=.,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |   "Create" "Party "
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |       527        314 |       841 
           |     99.06      97.82 |     98.59 
-----------+----------------------+----------
         1 |         5          7 |        12 
           |      0.94       2.18 |      1.41 
-----------+----------------------+----------
     Total |       532        321 |       853 
           |    100.00     100.00 |    100.00 

.                         ttest gwf_back if isupdem<`c'  & isupdem~=.,by(create)lev
> el(90)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [90% conf. interval]
---------+--------------------------------------------------------------------
       0 |     532    .0093985    .0041873      .09658     .002499     .016298
       1 |     321    .0218069    .0081646    .1462805    .0083383    .0352754
---------+--------------------------------------------------------------------
Combined |     853     .014068    .0040348    .1178404    .0074241    .0207118
---------+--------------------------------------------------------------------
    diff |           -.0124084    .0083224               -.0261124    .0012957
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.4910
H0: diff = 0                                     Degrees of freedom =      851

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0682         Pr(|T| > |t|) = 0.1363          Pr(T > t) = 0.9318

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.95* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.95* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.95*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.95*`se2' if _n==2                  
>        
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit(Probab
> ility of democratic collapse)saving(h1.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.02).06)yscale(ran
> ge(0 .07)) ///
>                                 col(gs1)legend(off)xtit("")tit({bf:Low} initial s
> upport for democracy) ///
>                                 xlab(1 "No create party (5)" 2 "Create party (7)"
> )xscale(range(.8 2.2)))
file h1.gph saved

.                         tab gwf_back create  if isupdem>`c'  & isupdem~=.,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |   "Create" "Party "
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |       737        114 |       851 
           |    100.00      97.44 |     99.65 
-----------+----------------------+----------
         1 |         0          3 |         3 
           |      0.00       2.56 |      0.35 
-----------+----------------------+----------
     Total |       737        117 |       854 
           |    100.00     100.00 |    100.00 

.                         ttest gwf_back if isupdem>`c' &  isupdem~=.,by(create)lev
> el(90)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [90% conf. interval]
---------+--------------------------------------------------------------------
       0 |     737           0           0           0           0           0
       1 |     117     .025641    .0146757    .1587417    .0013073    .0499747
---------+--------------------------------------------------------------------
Combined |     854    .0035129    .0020258       .0592    .0001771    .0068486
---------+--------------------------------------------------------------------
    diff |            -.025641    .0058291               -.0352395   -.0160425
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -4.3988
H0: diff = 0                                     Degrees of freedom =      852

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.95* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.95* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.95*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.95*`se2' if _n==2                  
>        
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit(Probab
> ility of democratic collapse)saving(h2.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.02).06)yscale(ran
> ge(0 .07)) ///
>                                 col(gs1)legend(off)xtit("")tit({bf:High} initial 
> support for democracy) ///
>                                 xlab(1 "No create party (0)" 2 "Create party (3)"
> )xscale(range(.8 2.2)))
file h2.gph saved

.                         tab gwf_back create  if  isupdem==.,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |   "Create" "Party "
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |       425        239 |       664 
           |     97.93      95.60 |     97.08 
-----------+----------------------+----------
         1 |         9         11 |        20 
           |      2.07       4.40 |      2.92 
-----------+----------------------+----------
     Total |       434        250 |       684 
           |    100.00     100.00 |    100.00 

.                         ttest gwf_back if isupdem==.,by(create)level(90)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [90% conf. interval]
---------+--------------------------------------------------------------------
       0 |     434    .0207373    .0068483    .1426681    .0094487    .0320259
       1 |     250        .044    .0129974    .2055065    .0225414    .0654586
---------+--------------------------------------------------------------------
Combined |     684    .0292398    .0064466    .1686012    .0186216    .0398579
---------+--------------------------------------------------------------------
    diff |           -.0232627    .0133669               -.0452791   -.0012462
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.7403
H0: diff = 0                                     Degrees of freedom =      682

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0411         Pr(|T| > |t|) = 0.0823          Pr(T > t) = 0.9589

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.95* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.95* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.95*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.95*`se2' if _n==2                  
>        
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit(Probab
> ility of democratic collapse)saving(h3.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.02).06)yscale(ran
> ge(0 .07)) ///
>                                 col(gs1)legend(off)xtit("")tit({bf:Missing data} 
> on support for democracy) ///
>                                 xlab(1 "No create party (9)" 2 "Create party (11)
> ")xscale(range(.8 2.2)))
file h3.gph saved

.                         gr combine h1.gph h2.gph h3.gph,xsize(8)tit(Democratic co
> llapse)col(3)

.                         gr export "$dir\golden\T-Democracy-ttests-by-demsupport.p
> df",as(pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -Democracy-ttests-by-demsupport.pdf saved as PDF format

.                         
.                         *** Party populism **
.                         qui centile i_pop,centile(50)

.                         local c = r(c_1)

.                         tab gwf_back create if i_pop<`c'  & i_pop~=.,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |   "Create" "Party "
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |       929        209 |     1,138 
           |     99.79      97.21 |     99.30 
-----------+----------------------+----------
         1 |         2          6 |         8 
           |      0.21       2.79 |      0.70 
-----------+----------------------+----------
     Total |       931        215 |     1,146 
           |    100.00     100.00 |    100.00 

.                         ttest gwf_back if i_pop<`c'  & i_pop~=.,by(create)level(9
> 0)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [90% conf. interval]
---------+--------------------------------------------------------------------
       0 |     931    .0021482    .0015182    .0463241   -.0003515     .004648
       1 |     215     .027907    .0112591    .1650907    .0093069    .0465071
---------+--------------------------------------------------------------------
Combined |   1,146    .0069808    .0024605    .0832954    .0029303    .0110313
---------+--------------------------------------------------------------------
    diff |           -.0257587    .0062592               -.0360625    -.015455
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -4.1154
H0: diff = 0                                     Degrees of freedom =     1144

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.645* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.645* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.645*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.645*`se2' if _n==2
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit(Probab
> ility of democratic collapse)saving(h1.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.02).06)yscale(ran
> ge(0 .06)) ///
>                                 col(gs1)legend(off)xtit("")tit("{bf:Low} populism
> ")text(.05 1.5 "p<0.01") ///
>                                 xlab(1 "Not create party (2)" 2 "Create party (6)
> ")xscale(range(.8 2.2)))
file h1.gph saved

.                         tab gwf_back create if i_pop>=`c'  & i_pop~=.,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |   "Create" "Party "
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |       742        393 |     1,135 
           |     98.54      96.80 |     97.93 
-----------+----------------------+----------
         1 |        11         13 |        24 
           |      1.46       3.20 |      2.07 
-----------+----------------------+----------
     Total |       753        406 |     1,159 
           |    100.00     100.00 |    100.00 

.                         ttest gwf_back if i_pop>=`c'  & i_pop~=.,by(create)level(
> 90)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [90% conf. interval]
---------+--------------------------------------------------------------------
       0 |     753    .0146082    .0043752    .1200582    .0074029    .0218136
       1 |     406    .0320197    .0087481    .1762696    .0175973    .0464421
---------+--------------------------------------------------------------------
Combined |   1,159    .0207075    .0041847    .1424648    .0138188    .0275963
---------+--------------------------------------------------------------------
    diff |           -.0174115    .0087606                -.031833   -.0029899
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.9875
H0: diff = 0                                     Degrees of freedom =     1157

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0236         Pr(|T| > |t|) = 0.0471          Pr(T > t) = 0.9764

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.645* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.645* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.645*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.645*`se2' if _n==2                 
>                
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit(Probab
> ility of democratic collapse)saving(h2.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.02).06)yscale(ran
> ge(0 .06)) ///
>                                 col(gs1)legend(off)xtit("")tit("{bf:High} populis
> m")text(.05 1.5 "p<0.05") ///
>                                 xlab(1 "Not create party (11)" 2 "Create party (1
> 3)")xscale(range(.8 2.2)))
file h2.gph saved

.                         
.                         *** Party age ***
.                         egen byear = min(year),by(lid)

.                         replace minyr = byear
(47 real changes made)

.                         gen oage = partyage if year==minyr
(1,799 missing values generated)

.                         egen iage=max(oage),by(lid)

.                         centile iage if year==min,centile(35)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
        iage |       592         35          10               8          12

.                         local c = 10

.                         tab gwf_back create if iage<=`c' ,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |   "Create" "Party "
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |       301        442 |       743 
           |     98.05      96.30 |     97.00 
-----------+----------------------+----------
         1 |         6         17 |        23 
           |      1.95       3.70 |      3.00 
-----------+----------------------+----------
     Total |       307        459 |       766 
           |    100.00     100.00 |    100.00 

.                         ttest gwf_back if iage<=`c',by(create)level(90)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [90% conf. interval]
---------+--------------------------------------------------------------------
       0 |     307     .019544    .0079133    .1386529    .0064882    .0325998
       1 |     459     .037037    .0088245    .1890586    .0224926    .0515815
---------+--------------------------------------------------------------------
Combined |     766    .0300261    .0061702    .1707706    .0198647    .0401875
---------+--------------------------------------------------------------------
    diff |           -.0174931    .0125831               -.0382155    .0032294
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.3902
H0: diff = 0                                     Degrees of freedom =      764

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0824         Pr(|T| > |t|) = 0.1649          Pr(T > t) = 0.9176

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.645* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.645* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.645*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.645*`se2' if _n==2                 
>                
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit(Probab
> ility of democratic collapse)saving(h3.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.02).06)yscale(ran
> ge(0 .06)) ///
>                                 col(gs1)legend(off)xtit("")tit({bf:Young} parties
> )text(.05 1.5 "p<0.10") ///
>                                 xlab(1 "No create party (6)" 2 "Create party (17)
> ")xscale(range(.8 2.2)))
file h3.gph saved

.                         tab gwf_back create  if iage>`c'  ,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |   "Create" "Party "
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,388        225 |     1,613 
           |     99.43      98.25 |     99.26 
-----------+----------------------+----------
         1 |         8          4 |        12 
           |      0.57       1.75 |      0.74 
-----------+----------------------+----------
     Total |     1,396        229 |     1,625 
           |    100.00     100.00 |    100.00 

.                         ttest gwf_back if iage>`c'  ,by(create)level(90)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [90% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,396    .0057307     .002021    .0755109    .0024042    .0090571
       1 |     229    .0174672     .008676    .1312913    .0031383    .0317962
---------+--------------------------------------------------------------------
Combined |   1,625    .0073846    .0021245    .0856423    .0038881    .0108811
---------+--------------------------------------------------------------------
    diff |           -.0117366    .0061009               -.0217774   -.0016958
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.9237
H0: diff = 0                                     Degrees of freedom =     1623

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0273         Pr(|T| > |t|) = 0.0546          Pr(T > t) = 0.9727

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.645* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.645* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.645*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.645*`se2' if _n==2                 
>                
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit(Probab
> ility of democratic collapse)saving(h4.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.02).06)yscale(ran
> ge(0 .06)) ///
>                                 col(gs1)legend(off)xtit("")tit({bf:Old} parties)t
> ext(.05 1.5 "p<0.05") ///
>                                 xlab(1 "No create party (8)" 2 "Create party (4)"
> )xscale(range(.8 2.2)))
(file h4.gph not found)
file h4.gph saved

.                         
.                         *** Party system institutionalization ***
.                         centile ipi if year==min,centile(30)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
         ipi |       575         30       6.116         5.77286    6.407333

.                         local c = r(c_1)

.                         tab gwf_back create if ipi<`c' ,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |   "Create" "Party "
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |       410        316 |       726 
           |     98.32      95.18 |     96.93 
-----------+----------------------+----------
         1 |         7         16 |        23 
           |      1.68       4.82 |      3.07 
-----------+----------------------+----------
     Total |       417        332 |       749 
           |    100.00     100.00 |    100.00 

.                         ttest gwf_back if ipi<`c',by(create)level(95)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     417    .0167866    .0062988    .1286253    .0044051     .029168
       1 |     332    .0481928     .011772    .2144966    .0250353    .0713502
---------+--------------------------------------------------------------------
Combined |     749    .0307076    .0063081    .1726396    .0183239    .0430913
---------+--------------------------------------------------------------------
    diff |           -.0314062    .0126547               -.0562492   -.0065632
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -2.4818
H0: diff = 0                                     Degrees of freedom =      747

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0066         Pr(|T| > |t|) = 0.0133          Pr(T > t) = 0.9934

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.645* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.645* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.*`se2' if _n==2                    
>        
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit(Probab
> ility of democratic collapse)saving(h5.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.02).06)yscale(ran
> ge(0 .06)) ///
>                                 col(gs1)legend(off)xtit("")tit({bf:Low} system in
> stitutionalization)text(.05 1.5 "p<0.01") ///
>                                 xlab(1 "No create party (7)" 2 "Create party (16)
> ")xscale(range(.8 2.2)))
(file h5.gph not found)
file h5.gph saved

.                         tab gwf_back create  if ipi>=`c'  ,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |   "Create" "Party "
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,279        351 |     1,630 
           |     99.46      98.60 |     99.27 
-----------+----------------------+----------
         1 |         7          5 |        12 
           |      0.54       1.40 |      0.73 
-----------+----------------------+----------
     Total |     1,286        356 |     1,642 
           |    100.00     100.00 |    100.00 

.                         ttest gwf_back if ipi>=`c',by(create)level(95)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,286    .0054432    .0020525    .0736058    .0014165    .0094699
       1 |     356    .0140449    .0062456    .1178418    .0017619     .026328
---------+--------------------------------------------------------------------
Combined |   1,642    .0073082    .0021026    .0852008    .0031841    .0114322
---------+--------------------------------------------------------------------
    diff |           -.0086017    .0050997               -.0186042    .0014008
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.6867
H0: diff = 0                                     Degrees of freedom =     1640

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0459         Pr(|T| > |t|) = 0.0918          Pr(T > t) = 0.9541

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.645* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.645* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.645*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.645*`se2' if _n==2                 
>                
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit(Probab
> ility of democratic collapse)saving(h6.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.02).06)yscale(ran
> ge(0 .06)) ///
>                                 col(gs1)legend(off)xtit("")tit({bf:High} system i
> nstitutionalization)text(.05 1.5 "p<0.05") ///
>                                 xlab(1 "No create party (7)" 2 "Create party (5)"
> )xscale(range(.8 2.2)))
(file h6.gph not found)
file h6.gph saved

.                         gr combine h1.gph h2.gph h3.gph h4.gph h5.gph h6.gph, col
> (2) ysize(7)iscale(.6)

.                         gr export "$dir\golden\Ch4-Democracy-ttests-by-partytype.
> pdf",as(pdf)replace
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h4-Democracy-ttests-by-partytype.pdf saved as PDF format

.                         
.                         
.                         local var  = "persparty priormil pres loggdp l1polar ipi"

.                         foreach v of local var {
  2.                                 qui reg `v' ld ivdem if year==min
  3.                                 qui predict r_`v' if e(sample)==1,r
  4.                                 qui xtset cowcode year
  5.                                 qui xtsum r_`v' 
  6.                                 local b = r(sd_b)
  7.                                 local w = r(sd_w)
  8.                                 local r = `w'/(`b' +`w')
  9.                                 di "`v'"
 10.                                 di `r'
 11.                         }
persparty
.53262763
priormil
.17889048
pres
.17028961
loggdp
.25452368
l1polar
.33205614
ipi
.28979752

.                         drop r_* 

.                         
.                 **********************
.                 ** Democratic decay **
.                 **********************
.                 global d="persparty"

.                 global ldv = "l1v2x_polyarchy l2v2x_polyarchy l3v2x_polyarchy"

.                 
.                   **** Look at serial correlation ****
.                   xtset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.                   qui xi:xtreg v2x_polyarchy  i.year persparty ld,fe

.                                 qui predict e_residuals_1, e

.                                 xtistest e_res, lags(2)

Inoue and Solon (2006) LM-test on variables e_residuals_1
Panelvar: cowcode
Timevar: year
p (lags): 2
-----------------------------------------------------------------------------------
> ---+
           Variable           |  IS-stat    p-value   |      N    maxT |   balance?
>    |
------------------------------+-----------------------+----------------+-----------
> ---|
        e_residuals_1         +   70.90      0.102    +    106      30 +     gaps  
>    |
-----------------------------------------------------------------------------------
> ---+
 Notes: Under H0, LM ~ chi2(p*T-p(p+1)/2)
    H0: No auto-correlation of any order.
    Ha: Auto-correlation up to order 2.

.                                 drop e_res

.                   qui xi:xtreg v2x_polyarchy ivdem  i.year persparty ld,fe

.                                 qui predict e_residuals_1, e

.                                 xtistest e_res, lags(2)

Inoue and Solon (2006) LM-test on variables e_residuals_1
Panelvar: cowcode
Timevar: year
p (lags): 2
-----------------------------------------------------------------------------------
> ---+
           Variable           |  IS-stat    p-value   |      N    maxT |   balance?
>    |
------------------------------+-----------------------+----------------+-----------
> ---|
        e_residuals_1         +   74.06      0.064    +    106      30 +     gaps  
>    |
-----------------------------------------------------------------------------------
> ---+
 Notes: Under H0, LM ~ chi2(p*T-p(p+1)/2)
    H0: No auto-correlation of any order.
    Ha: Auto-correlation up to order 2.

.                                 drop e_res

.                   qui xi:xtreg v2x_polyarchy l1v2x_poly l2v2x_poly  i.year perspa
> rty ld,fe

.                                 qui predict e_residuals_1, e

.                                 xtistest e_res, lags(2)

Inoue and Solon (2006) LM-test on variables e_residuals_1
Panelvar: cowcode
Timevar: year
p (lags): 2
-----------------------------------------------------------------------------------
> ---+
           Variable           |  IS-stat    p-value   |      N    maxT |   balance?
>    |
------------------------------+-----------------------+----------------+-----------
> ---|
        e_residuals_1         +   72.85      0.077    +    106      30 +     gaps  
>    |
-----------------------------------------------------------------------------------
> ---+
 Notes: Under H0, LM ~ chi2(p*T-p(p+1)/2)
    H0: No auto-correlation of any order.
    Ha: Auto-correlation up to order 2.

.                                 drop e_res

.                   qui xi:xtreg v2x_polyarchy l1v2x_poly l2v2x_poly l3v2x_poly i.y
> ear persparty ld,fe

.                                 qui predict e_residuals_1, e

.                                 xtistest e_res, lags(2)

Inoue and Solon (2006) LM-test on variables e_residuals_1
Panelvar: cowcode
Timevar: year
p (lags): 2
-----------------------------------------------------------------------------------
> ---+
           Variable           |  IS-stat    p-value   |      N    maxT |   balance?
>    |
------------------------------+-----------------------+----------------+-----------
> ---|
        e_residuals_1         +   68.72      0.137    +    106      30 +     gaps  
>    |
-----------------------------------------------------------------------------------
> ---+
 Notes: Under H0, LM ~ chi2(p*T-p(p+1)/2)
    H0: No auto-correlation of any order.
    Ha: Auto-correlation up to order 2.

.                                 drop e_res

.          
.                                 
.                         replace l1v2x_poly=l1v2x_poly*20
(2,390 real changes made)

.                         replace l2v2x_poly=l2v2x_poly*20
(2,385 real changes made)

.                         replace l3v2x_poly=l3v2x_poly*20
(2,374 real changes made)

. 
.                         * Create party *
.                         reghdfe v2x_polyarchy create ld ivdem,absorb(cowcode year
> )cluster(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,388
Absorbing 2 HDFE groups                           F(   3,    588) =      84.23
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9366
                                                  Adj R-squared   =     0.9328
                                                  Within R-sq.    =     0.4138
Number of clusters (lid)     =        589         Root MSE        =     0.0445

                                  (Std. err. adjusted for 589 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
v2x_polyar~y | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      create |   -.011876   .0054854    -2.17   0.031    -.0226493   -.0011027
          ld |   -.010053   .0059182    -1.70   0.090    -.0216765    .0015704
       ivdem |   .0748066   .0057205    13.08   0.000     .0635716    .0860417
       _cons |   .2050565   .0345088     5.94   0.000      .137281     .272832
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
        year |        30           1          29     |
-----------------------------------------------------+

.                         est store dem1a

.                         reghdfe v2x_polyarchy create $ldv ld,absorb(cowcode year)
> cluster(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,371
Absorbing 2 HDFE groups                           F(   5,    584) =      64.92
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9617
                                                  Adj R-squared   =     0.9594
                                                  Within R-sq.    =     0.6238
Number of clusters (lid)     =        585         Root MSE        =     0.0345

                                     (Std. err. adjusted for 585 clusters in lid)
---------------------------------------------------------------------------------
                |               Robust
  v2x_polyarchy | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------+----------------------------------------------------------------
         create |  -.0073366   .0031099    -2.36   0.019    -.0134446   -.0012286
l1v2x_polyarchy |   .0450839   .0035465    12.71   0.000     .0381185    .0520493
l2v2x_polyarchy |  -.0097519   .0020637    -4.73   0.000    -.0138051   -.0056987
l3v2x_polyarchy |   .0029414   .0012488     2.36   0.019     .0004886    .0053942
             ld |  -.0207707   .0045236    -4.59   0.000    -.0296551   -.0118863
          _cons |   .2315878   .0337623     6.86   0.000     .1652775     .297898
---------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
        year |        30           1          29     |
-----------------------------------------------------+

.                         est store dem1b

.                         * Party personalism *
.                         reghdfe v2x_polyarchy $d ld ivdem,absorb(cowcode year)clu
> ster(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,388
Absorbing 2 HDFE groups                           F(   3,    588) =      96.98
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9369
                                                  Adj R-squared   =     0.9331
                                                  Within R-sq.    =     0.4166
Number of clusters (lid)     =        589         Root MSE        =     0.0444

                                  (Std. err. adjusted for 589 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
v2x_polyar~y | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -.0355015   .0113508    -3.13   0.002    -.0577946   -.0132084
          ld |  -.0099074   .0059862    -1.66   0.098    -.0216642    .0018495
       ivdem |    .075311   .0055593    13.55   0.000     .0643924    .0862296
       _cons |   .2162658   .0341872     6.33   0.000      .149122    .2834096
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
        year |        30           1          29     |
-----------------------------------------------------+

.                         est store dem1

.                         reghdfe v2x_polyarchy $d $ldv ld,absorb(cowcode year)clus
> ter(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,371
Absorbing 2 HDFE groups                           F(   5,    584) =      65.58
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9617
                                                  Adj R-squared   =     0.9594
                                                  Within R-sq.    =     0.6238
Number of clusters (lid)     =        585         Root MSE        =     0.0345

                                     (Std. err. adjusted for 585 clusters in lid)
---------------------------------------------------------------------------------
                |               Robust
  v2x_polyarchy | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------+----------------------------------------------------------------
      persparty |  -.0174807   .0066023    -2.65   0.008    -.0304478   -.0045135
l1v2x_polyarchy |   .0451366   .0035446    12.73   0.000     .0381748    .0520984
l2v2x_polyarchy |  -.0097144   .0020665    -4.70   0.000    -.0137731   -.0056557
l3v2x_polyarchy |   .0029185   .0012474     2.34   0.020     .0004686    .0053684
             ld |  -.0204971   .0045033    -4.55   0.000    -.0293418   -.0116524
          _cons |   .2368867   .0333795     7.10   0.000     .1713282    .3024452
---------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
        year |        30           1          29     |
-----------------------------------------------------+

.                         est store dem1c

.                         
.                         * Newey, HAC, and PCSE errors *
.                         qui reghdfe v2x_polyarchy $d $ldv ld,absorb(cowcode year)
> cluster(lid)

.                         lincom $d

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0174807   .0066023    -2.65   0.008    -.0304478   -.0045135
------------------------------------------------------------------------------

.                         qui newey v2x_polyarchy i.cowcode i.year $d $ldv ld,lag(2
> )force

.                         lincom $d

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0174807   .0061729    -2.83   0.005     -.029586   -.0053753
------------------------------------------------------------------------------

.                         qui ivreghdfe v2x_polyarchy $d $ldv ld,a(cowcode year)bw(
> 3)rob

.                         lincom $d

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0174807    .006169    -2.83   0.005    -.0295783    -.005383
------------------------------------------------------------------------------

.                         qui xtpcse v2x_polyarchy i.cowcode i.year $d $ldv ld,corr
> (ar1)het pair

.                         lincom $d

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0198239   .0060488    -3.28   0.001    -.0316793   -.0079685
------------------------------------------------------------------------------

. 
.                         * Check IFE *
.                         regife v2x_polyarchy $d ld ivdem,absorb(cowcode year)ife(
> cowcode year,1)vce(cluster lid)

REGIFE                                            Number of obs   =       2388
Panel structure: cowcode, year                    F(   3,    588) =      47.19
Factor dimension: 1                               Prob > F        =     0.0000
Converged: true                                   Root MSE        =     0.0377
                                                  Iterations      =        316
------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -.0445152   .0113861    -3.91   0.000    -.0668776   -.0221527
          ld |   -.012173   .0085279    -1.43   0.154    -.0289218    .0045759
       ivdem |    .061756   .0066678     9.26   0.000     .0486604    .0748517
       _cons |   .3245638   .0398521     8.14   0.000     .2462941    .4028336
------------------------------------------------------------------------------

.                         est store dem1d

.                         regife v2x_polyarchy $d $ldv ld,absorb(cowcode year)ife(c
> owcode year,1)vce(cluster lid)
The algorithm did not converge : convergence error is 4.5e-08 (tolerance 1.0e-09)
Allow for more iterations with the option maxiter

REGIFE                                            Number of obs   =       2371
Panel structure: cowcode, year                    F(   5,    584) =     146.77
Factor dimension: 1                               Prob > F        =     0.0000
Converged: false                                  Root MSE        =     0.0293
                                                  Iterations      =      10000
---------------------------------------------------------------------------------
  v2x_polyarchy | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
----------------+----------------------------------------------------------------
      persparty |  -.0112357   .0051878    -2.17   0.031    -.0214246   -.0010467
l1v2x_polyarchy |   .0520085    .003484    14.93   0.000     .0451658    .0588512
l2v2x_polyarchy |  -.0152004   .0024277    -6.26   0.000    -.0199685   -.0104322
l3v2x_polyarchy |   .0039481   .0013622     2.90   0.004     .0012726    .0066235
             ld |  -.0154462   .0038013    -4.06   0.000    -.0229121   -.0079802
          _cons |   .1838198    .027671     6.64   0.000     .1294729    .2381667
---------------------------------------------------------------------------------

.                         est store dem1e

.                         regife v2x_polyarchy $d $ldv ld,absorb(cowcode year)ife(c
> owcode year,2)vce(cluster lid)
The algorithm did not converge : convergence error is 1.8e-08 (tolerance 1.0e-09)
Allow for more iterations with the option maxiter

REGIFE                                            Number of obs   =       2371
Panel structure: cowcode, year                    F(   5,    584) =      33.18
Factor dimension: 2                               Prob > F        =     0.0000
Converged: false                                  Root MSE        =     0.0257
                                                  Iterations      =      10000
---------------------------------------------------------------------------------
  v2x_polyarchy | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
----------------+----------------------------------------------------------------
      persparty |  -.0150015   .0056653    -2.65   0.008    -.0261284   -.0038745
l1v2x_polyarchy |   .0309676    .003811     8.13   0.000     .0234828    .0384525
l2v2x_polyarchy |  -.0066029   .0020986    -3.15   0.002    -.0107246   -.0024811
l3v2x_polyarchy |   .0001933   .0010399     0.19   0.853    -.0018492    .0022357
             ld |   -.038093   .0076586    -4.97   0.000    -.0531349   -.0230512
          _cons |   .4825329   .0436013    11.07   0.000     .3968985    .5681674
---------------------------------------------------------------------------------

.                         
.                         label var create "Create party"

.                         label var l1v2x_poly "Democracy level{sub:t-1}"

.                         label var l2v2x_poly "Democracy level{sub:t-2}"

.                         label var l3v2x_poly "Democracy level{sub:t-3}"

.                         coefplot (dem1a, msymbol(d))(dem1b, msymbol(oh))(dem1, ms
> ymbol(t))(dem1c, msymbol(D)) (dem1d, msymbol(Oh)) ///
>                                 (dem1e, msymbol(T)),  order(create persparty ivde
> m $ldv ld)  ///
>                                 drop(_cons  time) xline(0) msymbol(d) mfcolor(whi
> te) grid(glcolor(gs15)) ///
>                                 levels(95 90) legend(lab(3 "Create + initial dem.
> ")lab(6 "Create + lagged dem.") ///
>                                 lab(9 "Personalism + inital dem.")lab(12 "+ Perso
> nalism + lagged dem.")  ///
>                                 lab(15 "IFE, Personalism + inital dem.")lab(18 "I
> FE, + Personalism + lagged dem.") order(3 6 9 12 15 18) ///
>                                 size(small) pos(6) col(2) ring(1)) xsize(2) ysize
> (2) xlab(-.06(.03).09)  ///
>                                 xtitle("        Coefficient estimate", size(small
> ))  ///
>                                 ciopts(lwidth(thin)) aspectratio(1.1) scale(.75) 
> title(Democratic decay, size(medium) height(2))

.                         gr export "$dir\golden\T-Decay-Robustness.pdf",as(pdf)rep
> lace
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -Decay-Robustness.pdf saved as PDF format

. 
.                         * Check democratic decay against confounders *
.                         local i =1

.                         local var = "l2v2xps_party ipi i_pop election i.v2elparle
> l v2pavote v2paseats ipolar isupdem priormil pres econcrisis gdp lpop oilgas v2pa
> riglef"

.                         foreach v of local var {
  2.                                 di "`v'"
  3.                                 xtset lid year
  4.                                 qui  reghdfe v2x_polyarchy `v' $ldv $d ld,abso
> rb(cowcode year)cluster(lid)
  5.                                 lincom $d
  6.                                 qui nlcom _b[$d],post
  7.                                 matrix beta =e(b)  
  8.                                 local b = beta[1,1]
  9.                                 qui replace beta=`b' if n==`i'
 10.                                 matrix var = e(V) 
 11.                                 local se =var[1,1]
 12.                                 qui replace hi = `b' + sqrt(`se')*1.96 if n==`
> i'
 13.                                 qui replace lo = `b' - sqrt(`se')*1.96 if n==`
> i'
 14.                                 qui replace hi90 = `b' + sqrt(`se')*1.645 if n
> ==`i'
 15.                                 qui replace lo90 = `b' - sqrt(`se')*1.645 if n
> ==`i'
 16.                                 qui replace varname = "`v'" if n==`i'
 17.                                 local i = `i' +1
 18.                          }
l2v2xps_party

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0167898   .0065845    -2.55   0.011     -.029722   -.0038576
------------------------------------------------------------------------------
ipi

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0181523   .0066442    -2.73   0.006    -.0312024   -.0051021
------------------------------------------------------------------------------
i_pop

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -.017408   .0068798    -2.53   0.012    -.0309217   -.0038944
------------------------------------------------------------------------------
election

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0174427   .0066174    -2.64   0.009    -.0304396   -.0044459
------------------------------------------------------------------------------
i.v2elparlel

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0172212   .0064155    -2.68   0.007    -.0298214    -.004621
------------------------------------------------------------------------------
v2pavote

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0156811   .0067946    -2.31   0.021    -.0290313   -.0023308
------------------------------------------------------------------------------
v2paseats

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0189357   .0067507    -2.81   0.005    -.0321968   -.0056747
------------------------------------------------------------------------------
ipolar

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0164804   .0065316    -2.52   0.012    -.0293095   -.0036512
------------------------------------------------------------------------------
isupdem

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0086565    .006124    -1.41   0.158    -.0206969    .0033839
------------------------------------------------------------------------------
priormil

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0187798   .0067039    -2.80   0.005    -.0319465   -.0056132
------------------------------------------------------------------------------
pres

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0172078   .0066034    -2.61   0.009    -.0301771   -.0042386
------------------------------------------------------------------------------
econcrisis

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0173049   .0061319    -2.82   0.005    -.0293494   -.0052605
------------------------------------------------------------------------------
gdp

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0160153   .0063965    -2.50   0.013    -.0285794   -.0034511
------------------------------------------------------------------------------
lpop

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0167837   .0067125    -2.50   0.013    -.0299679   -.0035996
------------------------------------------------------------------------------
oilgas

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -.017656    .006804    -2.59   0.010    -.0310211    -.004291
------------------------------------------------------------------------------
v2pariglef

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0188628   .0070341    -2.68   0.008    -.0326804   -.0050451
------------------------------------------------------------------------------

.                         label define varlab 1  "Party instit." 2 "Initial party i
> nst." 3 "Populism" ///
>                                 4 "Election" 5 "Electoral system" 6 `""Ruling par
> ty" "leg. seat share""' ///
>                                 7 `""Ruling party" "vote share""' 8 "Polarization
> " 9`""Citizen support" "for democracy""' 10 "Prior military" ///
>                                 11 "Presidential" 12 "Economic crisis" 13 "GDP pe
> r capita" 14 "Population" 15 "Oil rents" 16 "Right-left ideology",replace

.                         label values n varlab

.                         twoway (scatter beta n if n<=16,mcol(blue)yscale(range(-.
> 03 0))yline(-.0187384,lcol(gs4)lpat(dash_dot))) ///
>                                 (rspike hi lo n if n<=16,lw(vthin)lcol(blue)ylab(
> -0.03(.01)0)) ///
>                                 (rspike hi90 lo90 n if n<=16,lcol(blue)lw(medium)
> ytitle("{&beta}{sub:Party personalism}", ///
>                                 size(large)height(4))tit(Democratic decay)subtit(
> "Covariate adjustment, dynamic panel model",size(small))   ///
>                                 xtitle(Added covariate,height(-12))yline(0,lpat(d
> ash)lcol(red))xlab(1(1)16,valuelabel angle(90))legend(off))

.                         gr export "$dir\golden\T-Persparty-DemDecay-covariates.pd
> f",as(pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -Persparty-DemDecay-covariates.pdf saved as PDF format

.                         
.                         * Adjusting for support for democracy does not change est
> imate for party personalism -- only changing the sample does *
.                         reghdfe v2x_polyarchy $ldv $d ld if isupdem~=.,absorb(cow
> code year)cluster(lid year)
(dropped 1 singleton observations)
(MWFE estimator converged in 7 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbac
> h & Miller applied.

HDFE Linear regression                            Number of obs   =      1,701
Absorbing 2 HDFE groups                           F(   5,     29) =      88.46
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9704
                                                  Adj R-squared   =     0.9681
Number of clusters (lid)     =        389         Within R-sq.    =     0.6464
Number of clusters (year)    =         30         Root MSE        =     0.0290

                                 (Std. err. adjusted for 30 clusters in lid year)
---------------------------------------------------------------------------------
                |               Robust
  v2x_polyarchy | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------+----------------------------------------------------------------
l1v2x_polyarchy |   .0479018   .0046409    10.32   0.000     .0384101    .0573935
l2v2x_polyarchy |  -.0114147   .0040811    -2.80   0.009    -.0197614   -.0030679
l3v2x_polyarchy |   .0020764   .0021625     0.96   0.345    -.0023465    .0064993
      persparty |  -.0088562   .0059118    -1.50   0.145    -.0209471    .0032347
             ld |   -.014204   .0037563    -3.78   0.001    -.0218864   -.0065215
          _cons |   .2169707   .0412627     5.26   0.000      .132579    .3013625
---------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        88           0          88     |
        year |        30          30           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

.                         reghdfe v2x_polyarchy isupdem $ldv $d ld,absorb(cowcode y
> ear)cluster(lid year)
(dropped 1 singleton observations)
(MWFE estimator converged in 7 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbac
> h & Miller applied.

HDFE Linear regression                            Number of obs   =      1,701
Absorbing 2 HDFE groups                           F(   6,     29) =      74.84
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9704
                                                  Adj R-squared   =     0.9681
Number of clusters (lid)     =        389         Within R-sq.    =     0.6466
Number of clusters (year)    =         30         Root MSE        =     0.0290

                                 (Std. err. adjusted for 30 clusters in lid year)
---------------------------------------------------------------------------------
                |               Robust
  v2x_polyarchy | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------+----------------------------------------------------------------
        isupdem |   .0021212   .0035479     0.60   0.555     -.005135    .0093775
l1v2x_polyarchy |   .0478778   .0046478    10.30   0.000     .0383721    .0573836
l2v2x_polyarchy |  -.0113999   .0040801    -2.79   0.009    -.0197446   -.0030551
l3v2x_polyarchy |   .0020663   .0021599     0.96   0.347    -.0023513    .0064839
      persparty |  -.0086565   .0059183    -1.46   0.154    -.0207607    .0034477
             ld |  -.0141283   .0037236    -3.79   0.001    -.0217439   -.0065127
          _cons |     .21666   .0411789     5.26   0.000     .1324397    .3008802
---------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        88           0          88     |
        year |        30          30           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. 
.                 ************************
.                 ** Democratic erosion **
.                 ************************
.                 gen time2 =time^2

.                         * Check different thresholds *
.                 forval i = 8(1)15 {
  2.                         di `i'
  3.                         local c = `i'/100
  4.                         qui reghdfe decline`i' ivdem ld persparty if ld`i'~=1,
> absorb(year)vce(cluster lid)  /* pooled */
  5.                         lincom persparty
  6.                         qui reghdfe decline`i' ivdem ld persparty if ld`i'~=1,
> absorb(cowcode year)vce(cluster lid) /* within */
  7.                         lincom persparty
  8.                 }        
8

 ( 1)  persparty = 0

------------------------------------------------------------------------------
    decline8 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0407461   .0167747     2.43   0.015     .0078009    .0736914
------------------------------------------------------------------------------

 ( 1)  persparty = 0

------------------------------------------------------------------------------
    decline8 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0395839    .022232     1.78   0.076    -.0040799    .0832477
------------------------------------------------------------------------------
9

 ( 1)  persparty = 0

------------------------------------------------------------------------------
    decline9 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0355667   .0141913     2.51   0.012     .0076952    .0634381
------------------------------------------------------------------------------

 ( 1)  persparty = 0

------------------------------------------------------------------------------
    decline9 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0445752   .0191509     2.33   0.020     .0069626    .0821877
------------------------------------------------------------------------------
10

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline10 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0375807   .0134248     2.80   0.005     .0112145    .0639469
------------------------------------------------------------------------------

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline10 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |    .044596   .0176083     2.53   0.012     .0100133    .0791788
------------------------------------------------------------------------------
11

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline11 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0342907   .0131663     2.60   0.009     .0084324    .0601491
------------------------------------------------------------------------------

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline11 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0410574   .0167331     2.45   0.014     .0081934    .0739214
------------------------------------------------------------------------------
12

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline12 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0290637   .0127874     2.27   0.023     .0039493     .054178
------------------------------------------------------------------------------

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline12 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |    .032998   .0163964     2.01   0.045     .0007955    .0652006
------------------------------------------------------------------------------
13

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline13 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0294199   .0128269     2.29   0.022     .0042281    .0546118
------------------------------------------------------------------------------

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline13 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0336816   .0163968     2.05   0.040     .0014782    .0658849
------------------------------------------------------------------------------
14

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline14 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |    .037701   .0144086     2.62   0.009     .0094027    .0659993
------------------------------------------------------------------------------

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline14 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0385584   .0166776     2.31   0.021     .0058035    .0713132
------------------------------------------------------------------------------
15

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline15 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0312044   .0125238     2.49   0.013     .0066077     .055801
------------------------------------------------------------------------------

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline15 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0320882   .0162509     1.97   0.049     .0001712    .0640051
------------------------------------------------------------------------------

.                 
.                  
.                 * Two-way FE LPM *
.                 reghdfe decline10 persparty ld if ld10~=1,absorb(cowcode year)clu
> ster(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,317
Absorbing 2 HDFE groups                           F(   2,    588) =       4.02
Statistics robust to heteroskedasticity           Prob > F        =     0.0185
                                                  R-squared       =     0.0769
                                                  Adj R-squared   =     0.0207
                                                  Within R-sq.    =     0.0049
Number of clusters (lid)     =        589         Root MSE        =     0.1155

                                  (Std. err. adjusted for 589 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   decline10 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0443311   .0176115     2.52   0.012     .0097419    .0789203
          ld |    .014925   .0083232     1.79   0.073    -.0014218    .0312719
       _cons |  -.0543295   .0282246    -1.92   0.055    -.1097628    .0011039
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 tab decline10 if e(sample)==1

  decline10 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      2,285       98.62       98.62
          1 |         32        1.38      100.00
------------+-----------------------------------
      Total |      2,317      100.00

.                 reghdfe decline10 persparty ivdem ld if ld10~=1,absorb(cowcode ye
> ar)cluster(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,317
Absorbing 2 HDFE groups                           F(   3,    588) =       2.92
Statistics robust to heteroskedasticity           Prob > F        =     0.0334
                                                  R-squared       =     0.0775
                                                  Adj R-squared   =     0.0209
                                                  Within R-sq.    =     0.0055
Number of clusters (lid)     =        589         Root MSE        =     0.1155

                                  (Std. err. adjusted for 589 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   decline10 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |    .044596   .0176083     2.53   0.012     .0100133    .0791788
       ivdem |   -.006013   .0071813    -0.84   0.403     -.020117     .008091
          ld |   .0168933   .0086792     1.95   0.052    -.0001528    .0339394
       _cons |  -.0174075   .0521174    -0.33   0.738    -.1197665    .0849514
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 
.                 * Check lag  of decline10 the prior year*
.                 reghdfe decline10 persparty ivdem ld ld10,absorb(cowcode year)clu
> ster(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      1,796
Absorbing 2 HDFE groups                           F(   4,    474) =     270.07
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.7296
                                                  Adj R-squared   =     0.7083
                                                  Within R-sq.    =     0.6252
Number of clusters (lid)     =        475         Root MSE        =     0.1203

                                  (Std. err. adjusted for 475 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   decline10 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0484184    .018126     2.67   0.008     .0128011    .0840357
       ivdem |  -.0008604   .0073864    -0.12   0.907    -.0153744    .0136536
          ld |   .0210959   .0128316     1.64   0.101     -.004118    .0463099
        ld10 |   .8997818   .0282734    31.82   0.000     .8442251    .9553385
       _cons |  -.0676833   .0430847    -1.57   0.117    -.1523439    .0169773
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       100           0         100     |
        year |        29           1          28     |
-----------------------------------------------------+

.                 tab decline10 if e(sample)==1

  decline10 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      1,702       94.77       94.77
          1 |         94        5.23      100.00
------------+-----------------------------------
      Total |      1,796      100.00

. 
.                 * Check IFE *
.                 regife decline10 persparty ivdem ld if ld10~=1,absorb(cowcode yea
> r)ife(cowcode year,1)vce(cluster lid)
The algorithm did not converge : convergence error is 3.9e-08 (tolerance 1.0e-09)
Allow for more iterations with the option maxiter

REGIFE                                            Number of obs   =       2317
Panel structure: cowcode, year                    F(   3,    588) =       2.17
Factor dimension: 1                               Prob > F        =     0.0909
Converged: false                                  Root MSE        =     0.0939
                                                  Iterations      =      10000
------------------------------------------------------------------------------
   decline10 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0352929   .0152818     2.31   0.021     .0052795    .0653064
       ivdem |  -.0011824   .0072667    -0.16   0.871    -.0154543    .0130895
          ld |   .0149873   .0093411     1.60   0.109    -.0033587    .0333332
       _cons |   -.041353   .0527399    -0.78   0.433    -.1449345    .0622285
------------------------------------------------------------------------------

.  
.                 * CRE Probit *
.                 xi:xthybrid decline10 ld time $d if ld10~=1,cluster(cowcode) vce(
> cluster cowcode)cre family(binomial)link(probit)se


Correlated random effects model. Family: binomial. Link: probit.

+-----------------------------------+
|             Variable |   model    |
|----------------------+------------|
| decline10            |            |
|         W__persparty |     1.3360 |
|                      |     0.4965 |
|                W__ld |     0.2752 |
|                      |     0.2725 |
|              W__time |     0.0111 |
|                      |     0.0151 |
|                D__ld |    -0.6388 |
|                      |     0.3049 |
|              D__time |    -0.0942 |
|                      |     0.0244 |
|         D__persparty |    -0.7803 |
|                      |     0.6463 |
|                _cons |    -0.3232 |
|                      |     0.5834 |
|----------------------+------------|
|   var(_cons[cowcode])|            |
|                _cons |     0.0000 |
|                      |     0.0000 |
|----------------------+------------|
| Statistics           |            |
|                   ll |  -143.7158 |
|                 chi2 |    50.2529 |
|                    p |     0.0000 |
|                  aic |   301.4316 |
|                  bic |   341.6768 |
+-----------------------------------+
                         Legend: b/se
Level 1: 2320 units. Level 2: 106 units.

.                 tab decline10 if e(sample)==1

  decline10 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      2,285       98.62       98.62
          1 |         32        1.38      100.00
------------+-----------------------------------
      Total |      2,317      100.00

.                 xi:xthybrid decline10 ivdem ld time $d if ld10~=1,cluster(cowcode
> ) vce(cluster cowcode)cre family(binomial)link(probit)se


Correlated random effects model. Family: binomial. Link: probit.

+-----------------------------------+
|             Variable |   model    |
|----------------------+------------|
| decline10            |            |
|         W__persparty |     1.3029 |
|                      |     0.4843 |
|                W__ld |     0.3400 |
|                      |     0.2605 |
|             W__ivdem |    -0.1793 |
|                      |     0.1644 |
|              W__time |     0.0135 |
|                      |     0.0147 |
|             D__ivdem |     0.0773 |
|                      |     0.1905 |
|                D__ld |    -0.5788 |
|                      |     0.3033 |
|              D__time |    -0.0985 |
|                      |     0.0243 |
|         D__persparty |    -0.8278 |
|                      |     0.6427 |
|                _cons |     0.0827 |
|                      |     0.5940 |
|----------------------+------------|
|   var(_cons[cowcode])|            |
|                _cons |     0.0000 |
|                      |     0.0000 |
|----------------------+------------|
| Statistics           |            |
|                   ll |  -141.7737 |
|                 chi2 |    57.3871 |
|                    p |     0.0000 |
|                  aic |   301.5474 |
|                  bic |   353.2913 |
+-----------------------------------+
                         Legend: b/se
Level 1: 2320 units. Level 2: 106 units.

.                 est store dem2

.                 local var =  "ivdem ld time persparty"

.                 foreach v of local var {
  2.                         qui egen xm_`v'=mean(`v') if e(sample)==1,by(cowcode)
  3.                 }

.                 probit decline10 ivdem ld time $d xm_* if ld10~=1,cluster(lid)

Iteration 0:  Log pseudolikelihood = -168.81136  
Iteration 1:  Log pseudolikelihood = -145.17539  
Iteration 2:  Log pseudolikelihood =  -141.2773  
Iteration 3:  Log pseudolikelihood = -141.21515  
Iteration 4:  Log pseudolikelihood = -141.21499  
Iteration 5:  Log pseudolikelihood = -141.21499  

Probit regression                                       Number of obs =  2,317
                                                        Wald chi2(8)  =  58.41
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -141.21499                       Pseudo R2     = 0.1635

                                  (Std. err. adjusted for 589 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
   decline10 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       ivdem |  -.1790112    .148634    -1.20   0.228    -.4703285    .1123061
          ld |   .3353071   .2588318     1.30   0.195     -.171994    .8426082
        time |   .0137053   .0148068     0.93   0.355    -.0153155    .0427262
   persparty |   1.299007   .4801381     2.71   0.007     .3579539    2.240061
    xm_ivdem |   .0754344   .1836334     0.41   0.681    -.2844804    .4353492
       xm_ld |   -.587635   .2928398    -2.01   0.045     -1.16159   -.0136795
     xm_time |  -.1016864   .0271478    -3.75   0.000    -.1548951   -.0484776
xm_persparty |  -.8255556   .6352648    -1.30   0.194    -2.070652    .4195405
       _cons |   .1776586   .6123878     0.29   0.772    -1.022599    1.377917
------------------------------------------------------------------------------

.                 margins,dydx(persparty)

Average marginal effects                                 Number of obs = 2,317
Model VCE: Robust

Expression: Pr(decline10), predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0393635   .0151221     2.60   0.009     .0097247    .0690023
------------------------------------------------------------------------------

.                 xtprobit decline10 ivdem ld time $d xm_* if ld10~=1,i(cowcode)vce
> (cluster cowcode)
warning: existing panel variable is not cowcode

Fitting comparison model:

Iteration 0:  Log pseudolikelihood = -168.81136  
Iteration 1:  Log pseudolikelihood = -145.17539  
Iteration 2:  Log pseudolikelihood =  -141.2773  
Iteration 3:  Log pseudolikelihood = -141.21515  
Iteration 4:  Log pseudolikelihood = -141.21499  
Iteration 5:  Log pseudolikelihood = -141.21499  

Fitting full model:

rho =  0.0    Log pseudolikelihood = -141.21499
rho =  0.1    Log pseudolikelihood = -143.76458

Iteration 0:  Log pseudolikelihood = -143.76458  
Iteration 1:  Log pseudolikelihood = -141.85812  
Iteration 2:  Log pseudolikelihood = -141.42713  
Iteration 3:  Log pseudolikelihood = -141.27009  
Iteration 4:  Log pseudolikelihood = -141.22689  
Iteration 5:  Log pseudolikelihood =  -141.2175  
Iteration 6:  Log pseudolikelihood = -141.21554  
Iteration 7:  Log pseudolikelihood = -141.21512  
Iteration 8:  Log pseudolikelihood = -141.21502  
Iteration 9:  Log pseudolikelihood = -141.21501  
Iteration 10: Log pseudolikelihood =   -141.215  

Calculating robust standard errors ...

Random-effects probit regression                     Number of obs    =  2,317
Group variable: cowcode                              Number of groups =    103

Random effects u_i ~ Gaussian                        Obs per group:
                                                                  min =      2
                                                                  avg =   22.5
                                                                  max =     30

Integration method: mvaghermite                      Integration pts. =     12

                                                     Wald chi2(8)     =  46.06
Log pseudolikelihood = -141.215                      Prob > chi2      = 0.0000

                              (Std. err. adjusted for 103 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
   decline10 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       ivdem |  -.1790139   .1650708    -1.08   0.278    -.5025468     .144519
          ld |     .33531   .2616639     1.28   0.200    -.1775419    .8481619
        time |   .0137057   .0146197     0.94   0.349    -.0149484    .0423598
   persparty |   1.299025   .4878075     2.66   0.008     .3429398     2.25511
    xm_ivdem |   .0754364   .1908714     0.40   0.693    -.2986647    .4495375
       xm_ld |  -.5876323   .3012571    -1.95   0.051    -1.178085    .0028208
     xm_time |  -.1016877   .0248789    -4.09   0.000    -.1504494    -.052926
xm_persparty |  -.8255261   .6375814    -1.29   0.195    -2.075163    .4241105
       _cons |   .1776095   .6073723     0.29   0.770    -1.012818    1.368037
-------------+----------------------------------------------------------------
    /lnsig2u |  -13.91742   105440.5                     -206673.4    206645.6
-------------+----------------------------------------------------------------
     sigma_u |   .0009503   50.10112                             0           .
         rho |   9.03e-07   .0952241                             0           .
------------------------------------------------------------------------------

.                 drop xm_*

.                 
.                 * Check democratic erosion against confounders *
.                         local i =1

.                         local var = "l1v2xps_party ipi v2xpa_popul election i.v2e
> lparlel v2pavote v2paseats ipolar isupdem priormil pres econcrisis gdp lpop oilga
> s v2pariglef"

.                         foreach v of local var {
  2.                                 di "`v'"
  3.                                 xtset lid year
  4.                                 qui xi:xthybrid decline10  `v' ivdem ld time $
> d if ld10~=1,cluster(cowcode) vce(cluster cowcode)cre family(binomial)link(probit
> )p
  5.                                 qui lincom  W__persparty
  6.                                 local b = r(estimate)
  7.                                 qui replace beta=`b' if n==`i'
  8.                                 qui lincom  W__persparty
  9.                                 mat l =r(lb)
 10.                                 mat h =r(ub)
 11.                                 local l = l[1,1]
 12.                                 local h = h[1,1]
 13.                                 qui replace hi = `h' if n==`i'
 14.                                 qui replace lo = `l' if n==`i'
 15.                                 qui replace varname = "`v'" if n==`i'
 16.                                 local i = `i' +1
 17.                          }
l1v2xps_party

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
ipi

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
v2xpa_popul

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
election

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
i.v2elparlel

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
v2pavote

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
v2paseats

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
ipolar

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
isupdem

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
priormil

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
pres

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
econcrisis

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
gdp

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
lpop

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
oilgas

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit
v2pariglef

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

.                         label define varlab  1 "Party instit." 2 "Initial party i
> nst." 3 "Populism" ///
>                                 4 "Election" 5 "Electoral system" 6 `""Ruling par
> ty" "leg. seat share""' ///
>                                 7 `""Ruling party" "vote share""' 8 "Polarization
> " 9 `""Citizen support" "for democracy""' 10 "Prior military" ///
>                                 11 "Presidential" 12 "Economic crisis" 13 "GDP pe
> r capita" 14 "Population" 15 "Oil rents" 16 "Right-left ideology",replace

.                         label values n varlab

.                         twoway (scatter beta n if n<=16,mcol(blue)yscale(range(-.
> 01 0.08))yline(1.3029 ,lcol(gs4)lpat(dash_dot))) ///
>                                 (rspike hi lo n if n<=16,lw(vthin)lcol(blue)ylab(
> 0(1)3) ytitle("{&beta}{sub:Party personalism}", ///
>                                 size(large)height(4))tit(Democratic erosion)subti
> t("Covariate adjustment, initial democracy level panel model",size(small))   ///
>                                 xtitle(Added covariate,height(-12))yline(0,lpat(d
> ash)lcol(red))xlab(1(1)16,valuelabel angle(90))legend(off))

.                         gr export "$dir\golden\T-Persparty-DemErosion-covariates.
> pdf",as(pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -Persparty-DemErosion-covariates.pdf saved as PDF format

.                         drop n

.                         
.                         
.                 * Kernel regression for democratic decline *
.                 qui reg decline10 persparty ivdem ld time if ld10~=1

.                 egen cnt =count(year) if e(sample)==1,by(cowcode)
(71 missing values generated)

.                 gen s = e(sample)==1  

.                 local var = "ivdem ld persparty time"

.                 foreach v of local var { 
  2.                         egen xm_`v' =mean(`v') if s==1,by(cowcode)
  3.                 }       
(71 missing values generated)
(71 missing values generated)
(71 missing values generated)
(71 missing values generated)

.                 qui reg decline10 ivdem ld persparty time time2 xm_* if ld10~=1

.                 lincom persparty

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline10 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0440364   .0171525     2.57   0.010     .0104005    .0776723
------------------------------------------------------------------------------

.                 qui reghdfe decline10 ivdem ld persparty if ld10~=1,a(cowcode yea
> r)

.                 lincom persparty

 ( 1)  persparty = 0

------------------------------------------------------------------------------
   decline10 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |    .044596   .0172431     2.59   0.010     .0107813    .0784107
------------------------------------------------------------------------------

.                  
.                 krls decline10 ivdem ld persparty time time2 xm_ivdem xm_ld xm_pe
> rsparty xm_time,d(k)lambda(7.348)

Pointwise Derivatives                                      Number of obs =     2320
>  
                                                           Lambda        =    7.348
>  
                                                           Tolerance     =        0
>  
                                                           Sigma         =        9
>  
                                                           Eff. df       =    44.95
>  
                                                           R2            =   .08526
>  
                                                           Looloss       =    261.3

    decline10 |      Avg.       SE        t    P>|t|        P25       P50       P75
>        
--------------+--------------------------------------------------------------------
        ivdem | -.002044   .001948   -1.049    0.294   -.004759  -.002263   .000119
>   
           ld |  .004672   .002326    2.008    0.045    .000879   .003327   .007289
>   
    persparty |  .023183   .013057    1.775    0.076   -.000695   .012126   .042483
>   
         time | -.000047   .000196   -0.240    0.810    -.00058  -.000061   .000389
>   
        time2 |   .00001   4.4e-06    2.386    0.017   -7.2e-06   3.8e-06   .000022
>   
     xm_ivdem |  .000036   .001996    0.018    0.985   -.001985   .000597   .002412
>   
        xm_ld | -.016214   .002987   -5.429    0.000   -.026713   -.01421  -.002357
>   
 xm_persparty | -.011462   .018838   -0.608    0.543   -.025879  -.006221   .008114
>   
      xm_time | -.005941    .00099   -6.002    0.000    -.01101  -.004363  -.000332
>   
--------------+--------------------------------------------------------------------


.                 qui sum persparty

.                 replace k_pers=k_pers*r(sd)*4  /* probability over four years */
(2,320 real changes made)

.                 ttest k_pers,by(pres)   

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,173    .0180576    .0008935    .0306006    .0163046    .0198106
       1 |   1,147     .023675    .0009185    .0311083    .0218728    .0254772
---------+--------------------------------------------------------------------
Combined |   2,320    .0208348    .0006431    .0309737    .0195738    .0220958
---------+--------------------------------------------------------------------
    diff |           -.0056174    .0012812               -.0081298    -.003105
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -4.3846
H0: diff = 0                                     Degrees of freedom =     2318

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

.                 sum k_pers if v2paseats==.

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
 k_persparty |        166    .0257013    .0354477  -.0291976   .1107269

.                 sum k_pers if v2paseats!=.

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
 k_persparty |      2,154    .0204598     .030579  -.0333875   .1494892

.                 sum decline10 if s==1  /* 1.4 percent of country-years; so over 4
>  years: 5.5 percent */

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   decline10 |      2,320    .0137931    .1166564          0          1

. 
.                 twoway (lpolyci k_pers v2paseat,bw(15)col(gs12)lpat(dot)) ///
>                         (lpoly k_pers v2paseat if pres==1,bw(15)lcol(gs6)lpat(sol
> id)xlab(0(20)100)  ///
>                         legend(lab(1 "All democracies")lab(2 "CI") lab(3 "Preside
> ntial") lab(4 "Parliamentary")order(1 3 4)pos(6)ring(1)col(3)) ///
>                         tit(Party personalism and democratic decline)ytit(Margina
> l effect of Party personalism)) ///
>                         (lpoly k_pers v2paseat if pres==0,bw(15) lpat(dash)col(gs
> 1)xtit(Ruling party seat share)  ///
>                         ytit(Marginal effect of Party personalism)ylab(0(.02).06)
>  )

.                 gr export "$dir\golden\T-DemDecline-SeatShare.pdf",as(pdf)replace
>  
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -DemDecline-SeatShare.pdf saved as PDF format

.                  
.                  
.                 ****************************
.                 ** Descriptives by region **
.                 ****************************
.                 label def region 1 "Eastern Europe and Central Asia" 2 "Latin Ame
> rica and the Caribbean"  ///
>                         3 "Middle East and North Africa" 4 "Sub-Saharan Africa" 5
>  "Western Europe and North America" ///
>                         6 "Asia and Pacific" ,replace

.                 label val pregion region

.                 tab pregion if (decline10==1 & ld10~=1) | gwf_back==1

                         pregion |      Freq.     Percent        Cum.
---------------------------------+-----------------------------------
 Eastern Europe and Central Asia |         13       23.21       23.21
 Latin America and the Caribbean |          9       16.07       39.29
    Middle East and North Africa |          3        5.36       44.64
              Sub-Saharan Africa |         19       33.93       78.57
Western Europe and North America |          1        1.79       80.36
                Asia and Pacific |         11       19.64      100.00
---------------------------------+-----------------------------------
                           Total |         56      100.00

.                 
.                 
.                 *************************
.                 ** Democratic collapse **
.                 *************************
.                 drop xm_*

.                 * Create party *
.                 reghdfe gwf_back create ld ivdem,absorb(cowcode year)cluster(lid 
> year)
(dropped 3 singleton observations)
(MWFE estimator converged in 6 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbac
> h & Miller applied.

HDFE Linear regression                            Number of obs   =      2,388
Absorbing 2 HDFE groups                           F(   3,     29) =       8.60
Statistics robust to heteroskedasticity           Prob > F        =     0.0003
                                                  R-squared       =     0.1288
                                                  Adj R-squared   =     0.0766
Number of clusters (lid)     =        589         Within R-sq.    =     0.0277
Number of clusters (year)    =         30         Root MSE        =     0.1105

                              (Std. err. adjusted for 30 clusters in lid year)
------------------------------------------------------------------------------
             |               Robust
    gwf_back | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      create |   .0165608   .0048529     3.41   0.002     .0066356    .0264861
          ld |   .0434594   .0105336     4.13   0.000     .0219157    .0650031
       ivdem |  -.0260951    .008165    -3.20   0.003    -.0427945   -.0093957
       _cons |   .0635053   .0546314     1.16   0.255    -.0482284     .175239
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
        year |        30          30           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

.                 reghdfe gwf_back create ld $ldv,absorb(cowcode year)cluster(lid y
> ear)
(dropped 3 singleton observations)
(MWFE estimator converged in 6 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbac
> h & Miller applied.

HDFE Linear regression                            Number of obs   =      2,371
Absorbing 2 HDFE groups                           F(   5,     29) =       8.96
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1402
                                                  Adj R-squared   =     0.0874
Number of clusters (lid)     =        585         Within R-sq.    =     0.0387
Number of clusters (year)    =         30         Root MSE        =     0.1103

                                 (Std. err. adjusted for 30 clusters in lid year)
---------------------------------------------------------------------------------
                |               Robust
       gwf_back | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------+----------------------------------------------------------------
         create |    .014852   .0053151     2.79   0.009     .0039815    .0257225
             ld |   .0533898   .0127248     4.20   0.000     .0273647     .079415
l1v2x_polyarchy |  -.0146451   .0047924    -3.06   0.005    -.0244466   -.0048435
l2v2x_polyarchy |   .0014603   .0040929     0.36   0.724    -.0069106    .0098312
l3v2x_polyarchy |  -.0025425     .00235    -1.08   0.288    -.0073488    .0022639
          _cons |    .068027   .0544121     1.25   0.221    -.0432582    .1793123
---------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
        year |        30          30           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

.                 * Party personalism *
.                 reghdfe gwf_back $d ld ivdem,absorb(cowcode year)cluster(lid year
> )
(dropped 3 singleton observations)
(MWFE estimator converged in 6 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbac
> h & Miller applied.

HDFE Linear regression                            Number of obs   =      2,388
Absorbing 2 HDFE groups                           F(   3,     29) =       7.61
Statistics robust to heteroskedasticity           Prob > F        =     0.0007
                                                  R-squared       =     0.1276
                                                  Adj R-squared   =     0.0753
Number of clusters (lid)     =        589         Within R-sq.    =     0.0263
Number of clusters (year)    =         30         Root MSE        =     0.1106

                              (Std. err. adjusted for 30 clusters in lid year)
------------------------------------------------------------------------------
             |               Robust
    gwf_back | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0268965   .0117323     2.29   0.029     .0029013    .0508918
          ld |   .0425233   .0104897     4.05   0.000     .0210694    .0639772
       ivdem |  -.0267388   .0081143    -3.30   0.003    -.0433345   -.0101431
       _cons |   .0615497    .052067     1.18   0.247    -.0449393    .1680388
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
        year |        30          30           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

.                 reghdfe gwf_back $d ld $ldv,absorb(cowcode year)cluster(lid year)
(dropped 3 singleton observations)
(MWFE estimator converged in 6 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbac
> h & Miller applied.

HDFE Linear regression                            Number of obs   =      2,371
Absorbing 2 HDFE groups                           F(   5,     29) =       7.40
Statistics robust to heteroskedasticity           Prob > F        =     0.0001
                                                  R-squared       =     0.1390
                                                  Adj R-squared   =     0.0862
Number of clusters (lid)     =        585         Within R-sq.    =     0.0374
Number of clusters (year)    =         30         Root MSE        =     0.1103

                                 (Std. err. adjusted for 30 clusters in lid year)
---------------------------------------------------------------------------------
                |               Robust
       gwf_back | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------+----------------------------------------------------------------
      persparty |   .0212085   .0113152     1.87   0.071    -.0019338    .0443507
             ld |   .0524884   .0127581     4.11   0.000     .0263951    .0785817
l1v2x_polyarchy |  -.0148241   .0047692    -3.11   0.004    -.0245781   -.0050701
l2v2x_polyarchy |   .0014155   .0040824     0.35   0.731    -.0069339    .0097649
l3v2x_polyarchy |  -.0025305   .0023361    -1.08   0.288    -.0073083    .0022473
          _cons |   .0668559   .0528403     1.27   0.216    -.0412147    .1749265
---------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
        year |        30          30           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

.                 local var ="$d d1 d2 d3 ivdem time"

.                 foreach v of local var {
  2.                         egen xm_`v'=mean(`v') if e(sample)==1,by(cowcode)
  3.                 }
(20 missing values generated)
(20 missing values generated)
(20 missing values generated)
(20 missing values generated)
(20 missing values generated)
(20 missing values generated)

.                 probit gwf_back $d d1 d2 d3 ivdem time xm_*,vce(cluster lid)

Iteration 0:  Log pseudolikelihood = -169.55368  
Iteration 1:  Log pseudolikelihood = -121.43643  
Iteration 2:  Log pseudolikelihood =  -107.9211  
Iteration 3:  Log pseudolikelihood = -104.39266  
Iteration 4:  Log pseudolikelihood = -103.84433  
Iteration 5:  Log pseudolikelihood = -103.49992  
Iteration 6:  Log pseudolikelihood = -103.17286  
Iteration 7:  Log pseudolikelihood = -102.89524  
Iteration 8:  Log pseudolikelihood = -102.74709  
Iteration 9:  Log pseudolikelihood = -102.48148  
Iteration 10: Log pseudolikelihood = -102.33946  
Iteration 11: Log pseudolikelihood = -102.32612  
Iteration 12: Log pseudolikelihood = -102.32596  
Iteration 13: Log pseudolikelihood = -102.32596  

Probit regression                                       Number of obs =  2,371
                                                        Wald chi2(12) = 121.42
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -102.32596                       Pseudo R2     = 0.3965

                                  (Std. err. adjusted for 585 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
    gwf_back | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |     1.1992   .5492967     2.18   0.029     .1225987    2.275802
          d1 |   .1094585   .0761109     1.44   0.150    -.0397162    .2586331
          d2 |   .0014765   .0032235     0.46   0.647    -.0048415    .0077945
          d3 |  -6.07e-06   .0000385    -0.16   0.875    -.0000815    .0000693
       ivdem |  -.7547848    .138131    -5.46   0.000    -1.025517    -.484053
        time |  -.0280384   .0259703    -1.08   0.280    -.0789393    .0228624
xm_persparty |   -.600183   .7769615    -0.77   0.440       -2.123    .9226337
       xm_d1 |   -.477569   .1615278    -2.96   0.003    -.7941577   -.1609803
       xm_d2 |   .0106154    .007621     1.39   0.164    -.0043215    .0255523
       xm_d3 |  -.0001156   .0000948    -1.22   0.223    -.0003014    .0000702
    xm_ivdem |   .5720956   .1555266     3.68   0.000     .2672691     .876922
     xm_time |  -.0442441   .0332492    -1.33   0.183    -.1094113     .020923
       _cons |   1.497941   .6685955     2.24   0.025     .1875181    2.808364
------------------------------------------------------------------------------
Note: 526 failures and 0 successes completely determined.

.                 margins,dydx(persparty)

Average marginal effects                                 Number of obs = 2,371
Model VCE: Robust

Expression: Pr(gwf_back), predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |    .027128   .0127765     2.12   0.034     .0020865    .0521695
------------------------------------------------------------------------------

.                 est store dem3

.                 drop xm_ivdem

.                 forval i = 1/3 {
  2.                         egen xm_l`i' = mean(l`i'v2x_polyarchy),by(cowcode)
  3.                 }

.                 probit gwf_back $d d1 d2 d3 $ldv time xm_*,vce(cluster lid)

Iteration 0:  Log pseudolikelihood = -169.55368  
Iteration 1:  Log pseudolikelihood = -118.19206  
Iteration 2:  Log pseudolikelihood = -103.02299  
Iteration 3:  Log pseudolikelihood = -100.08315  
Iteration 4:  Log pseudolikelihood = -99.560471  
Iteration 5:  Log pseudolikelihood = -99.295197  
Iteration 6:  Log pseudolikelihood = -98.957255  
Iteration 7:  Log pseudolikelihood = -98.794731  
Iteration 8:  Log pseudolikelihood =  -98.57496  
Iteration 9:  Log pseudolikelihood = -98.226728  
Iteration 10: Log pseudolikelihood = -97.774054  
Iteration 11: Log pseudolikelihood = -97.698754  
Iteration 12: Log pseudolikelihood = -97.695507  
Iteration 13: Log pseudolikelihood =   -97.6955  

Probit regression                                       Number of obs =  2,371
                                                        Wald chi2(16) = 150.82
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -97.6955                         Pseudo R2     = 0.4238

                                     (Std. err. adjusted for 585 clusters in lid)
---------------------------------------------------------------------------------
                |               Robust
       gwf_back | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
----------------+----------------------------------------------------------------
      persparty |    1.13065   .5394928     2.10   0.036     .0732638    2.188037
             d1 |   .1920079   .0807546     2.38   0.017     .0337317     .350284
             d2 |  -.0039119   .0042793    -0.91   0.361    -.0122991    .0044753
             d3 |    .000077   .0000618     1.25   0.213    -.0000441    .0001982
l1v2x_polyarchy |  -.3419645   .1230174    -2.78   0.005    -.5830742   -.1008548
l2v2x_polyarchy |  -.0433154    .167518    -0.26   0.796    -.3716446    .2850138
l3v2x_polyarchy |   .0909294   .1014324     0.90   0.370    -.1078744    .2897332
           time |  -.0469101   .0252839    -1.86   0.064    -.0964655    .0026454
   xm_persparty |  -.7686563   .7713071    -1.00   0.319    -2.280391    .7430778
          xm_d1 |  -.6070873   .1778978    -3.41   0.001    -.9557606   -.2584141
          xm_d2 |   .0195412   .0092937     2.10   0.035      .001326    .0377565
          xm_d3 |  -.0002752   .0001414    -1.95   0.052    -.0005524    2.00e-06
        xm_time |  -.0276717   .0345482    -0.80   0.423    -.0953849    .0400414
          xm_l1 |   .3270916   .2946227     1.11   0.267    -.2503584    .9045415
          xm_l2 |  -.5407834   .6052058    -0.89   0.372    -1.726965    .6453982
          xm_l3 |    .422891   .3666297     1.15   0.249      -.29569    1.141472
          _cons |   1.861356   .6978853     2.67   0.008     .4935263    3.229186
---------------------------------------------------------------------------------
Note: 631 failures and 0 successes completely determined.

.                 margins,dydx(persparty)

Average marginal effects                                 Number of obs = 2,371
Model VCE: Robust

Expression: Pr(gwf_back), predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0243844   .0116176     2.10   0.036     .0016144    .0471544
------------------------------------------------------------------------------

.                 * IV-2SLS estimator *
.                 reghdfe gwf_back v2paind d1 d2 d3 ivdem,absorb(cowcode year)clust
> er(lid year)
(dropped 2 singleton observations)
(MWFE estimator converged in 6 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbac
> h & Miller applied.

HDFE Linear regression                            Number of obs   =      2,240
Absorbing 2 HDFE groups                           F(   5,     29) =       7.53
Statistics robust to heteroskedasticity           Prob > F        =     0.0001
                                                  R-squared       =     0.1354
                                                  Adj R-squared   =     0.0804
Number of clusters (lid)     =        543         Within R-sq.    =     0.0313
Number of clusters (year)    =         30         Root MSE        =     0.1066

                              (Std. err. adjusted for 30 clusters in lid year)
------------------------------------------------------------------------------
             |               Robust
    gwf_back | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .0075447   .0039675     1.90   0.067    -.0005698    .0156591
          d1 |   .0069485   .0029867     2.33   0.027       .00084    .0130571
          d2 |  -.0000226   9.45e-06    -2.39   0.024    -.0000419   -3.25e-06
          d3 |   7.64e-08   4.23e-08     1.81   0.081    -1.01e-08    1.63e-07
       ivdem |  -.0159793   .0060676    -2.63   0.013    -.0283888   -.0035698
       _cons |  -.0773804   .1159368    -0.67   0.510    -.3144977    .1597369
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       100           0         100     |
        year |        30          30           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

.                 ivreghdfe gwf_back d1 d2 d3 ivdem (v2paind=create),absorb(cowcode
>  year)cluster(lid year)
(dropped 2 singleton observations)
(MWFE estimator converged in 6 iterations)

IV (2SLS) estimation
--------------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and clustering on lid and year

Number of clusters (lid) =         543                Number of obs =     2240
Number of clusters (year) =         30                F(  5,    29) =     5.79
                                                      Prob > F      =   0.0008
Total (centered) SS     =  24.67639168                Centered R2   =  -0.0377
Total (uncentered) SS   =  24.67639168                Uncentered R2 =  -0.0377
Residual SS             =  25.60625597                Root MSE      =    .1095

------------------------------------------------------------------------------
             |               Robust
    gwf_back | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .0443079   .0142621     3.11   0.004     .0151386    .0734771
          d1 |   .0058058   .0029638     1.96   0.060    -.0002558    .0118675
          d2 |  -6.40e-06   .0000131    -0.49   0.628    -.0000331    .0000203
          d3 |   1.35e-08   6.03e-08     0.22   0.824    -1.10e-07    1.37e-07
       ivdem |  -.0023086   .0073454    -0.31   0.756    -.0173316    .0127145
------------------------------------------------------------------------------
Underidentification test (Kleibergen-Paap rk LM statistic):             10.773
                                                   Chi-sq(1) P-val =    0.0010
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic):               84.222
                         (Kleibergen-Paap rk Wald F statistic):         16.064
Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                         15% maximal IV size              8.96
                                         20% maximal IV size              6.66
                                         25% maximal IV size              5.53
Source: Stock-Yogo (2005).  Reproduced by permission.
NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         0.000
                                                 (equation exactly identified)
------------------------------------------------------------------------------
Instrumented:         v2paind
Included instruments: d1 d2 d3 ivdem
Excluded instruments: create
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       100           0         100     |
        year |        30          30           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

.                 
.                 *** Marginal effect over time ***
.                 drop xm_* k_*

.                 qui reghdfe gwf_back $d time d1 d2 d3 ivdem,absorb(cowcode)cluste
> r(lid)

.                 lincom $d

 ( 1)  persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0267707   .0164569     1.63   0.104    -.0055507    .0590921
------------------------------------------------------------------------------

.                 local var = "persparty d1 d2 d3 ivdem time"

.                 foreach v of local var {
  2.                         qui egen xm_`v'=mean(`v'),by(cowcode)
  3.                 }

.                 qui reg gwf_back $d time d1 d2 d3 ivdem xm_*,cluster(lid)

.                 lincom $d

 ( 1)  persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0267707   .0170644     1.57   0.117    -.0067435     .060285
------------------------------------------------------------------------------

.                 qui probit gwf_back $d time d1 d2 d3 ivdem xm_*,cluster(lid)

.                 margins,dydx($d)        

Average marginal effects                                 Number of obs = 2,391
Model VCE: Robust

Expression: Pr(gwf_back), predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0279448   .0133374     2.10   0.036     .0018041    .0540856
------------------------------------------------------------------------------

. 
.                 krls gwf_back $d d1 d2 d3 ivdem time xm_*,d(k)
Iteration =  1, Looloss: 285.5891  
Iteration =  2, Looloss: 284.9506  
Iteration =  3, Looloss: 284.1809  
Iteration =  4, Looloss: 283.3224  
Iteration =  5, Looloss: 282.4176  
Iteration =  6, Looloss: 281.4883  
Iteration =  7, Looloss: 280.5411  
Iteration =  8, Looloss: 279.5939  
Iteration =  9, Looloss: 278.6922  
Iteration = 10, Looloss: 277.9005  
Iteration = 11, Looloss: 277.2745  

Pointwise Derivatives                                      Number of obs =     2391
>  
                                                           Lambda        =    5.307
>  
                                                           Tolerance     =    2.391
>  
                                                           Sigma         =       12
>  
                                                           Eff. df       =    39.84
>  
                                                           R2            =   .09015
>  
                                                           Looloss       =    276.6

     gwf_back |      Avg.       SE        t    P>|t|        P25       P50       P75
>        
--------------+--------------------------------------------------------------------
    persparty |  .012034   .013957    0.862    0.389   -.003607   .012182   .027325
>   
           d1 |  .000182   .000091    1.987    0.047    .000088   .000191   .000274
>   
           d2 |  4.5e-07   2.8e-07    1.589    0.112    1.4e-07   4.4e-07   7.3e-07
>   
           d3 |  7.9e-10   1.5e-09    0.536    0.592   -4.1e-11   8.4e-10   1.7e-09
>   
        ivdem | -.008241   .002393   -3.443    0.001   -.013428  -.007948  -.001665
>   
         time |  .000157   .000254    0.619    0.536   -.000482   .000016   .000808
>   
 xm_persparty |  .000292   .020178    0.014    0.988   -.012206   .000822   .016013
>   
        xm_d1 | -.000722   .000087   -8.314    0.000    -.00117    -.0007  -.000291
>   
        xm_d2 | -8.1e-07   2.8e-07   -2.886    0.004   -1.4e-06  -7.6e-07  -1.4e-07
>   
        xm_d3 | -4.1e-10   1.5e-09   -0.283    0.777   -1.2e-09  -5.6e-10   2.4e-10
>   
     xm_ivdem |  .001642   .002483    0.661    0.508   -.000441   .002178   .005923
>   
      xm_time | -.003763   .001129   -3.332    0.001   -.007262   -.00202   .000036
>   
--------------+--------------------------------------------------------------------


.                 gen kpers=k_pers*.6*3   /* Marginal effect over three years in of
> fice of a change from low to high personalism (0.6) */ 

.                 sum kpers

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       kpers |      2,391    .0216612    .0448419  -.2234501   .1954253

.                 twoway lpolyci kpers year,ylab(0(.01).04)legend(off)xtit(Year) //
> /
>                         ytit("Marginal effect of party personalism" "on democrati
> c collapse",size(small)) ///
>                         tit(Party personalism increases democratic collapse more 
> in the past decade)

.                 gr export "$dir\golden\Ch4-Persparty-Collapse-Year.pdf",as(pdf)re
> place 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h4-Persparty-Collapse-Year.pdf saved as PDF format

.                         
.                 * Check democratic collapse against confounders *
.                 drop xm_*

.                 gen n=_n

.                 gen proportional= v2elparlel==1 | v2elparlel==3

.                 gen mixed =  v2elparlel==2

.                 qui reghdfe gwf_back $d d1 d2 d3 $ldv,absorb(cowcode year)

.                 local var ="$d d1 d2 d3 ivdem time"

.                 foreach v of local var {
  2.                         egen xm_`v'=mean(`v') if e(sample)==1,by(cowcode)
  3.                 }
(20 missing values generated)
(20 missing values generated)
(20 missing values generated)
(20 missing values generated)
(20 missing values generated)
(20 missing values generated)

.                 local i =1

.                 local var="l2v2xps_party ipi i_pop election proportional mixed v2
> pavote v2paseats ipolar isupdem priormil pres econcrisis gdp lpop oilgas"

.                 foreach v of local var {
  2.                                 di "`v'"
  3.                                 egen mx_`v'=mean(`v'),by(cowcode)
  4.                                 xtset lid year
  5.                                 qui probit gwf_back `v' $d d1 d2 d3 ivdem xm_*
>  mx_,cluster(lid)
  6.                                 lincom $d
  7.                                 qui nlcom _b[$d],post
  8.                                 matrix beta =e(b)  
  9.                                 local b = beta[1,1]
 10.                                 qui replace beta=`b' if n==`i'
 11.                                 qui probit gwf_back `v' $d d1 d2 d3 ivdem xm_*
>  mx_,cluster(lid)
 12.                                 qui lincom $d
 13.                                 mat l =r(lb)
 14.                                 mat h =r(ub)
 15.                                 local l = l[1,1]
 16.                                 local h = h[1,1]
 17.                                 qui replace hi = `h' if n==`i'
 18.                                 qui replace lo = `l' if n==`i'
 19.                                 qui replace varname = "`v'" if n==`i'
 20.                                 local i = `i' +1
 21.                                 drop mx_
 22.                         }
l2v2xps_party
(1 missing value generated)

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.347012   .6249974     2.16   0.031     .1220399    2.571985
------------------------------------------------------------------------------
ipi
(22 missing values generated)

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.352914   .5441623     2.49   0.013     .2863753    2.419452
------------------------------------------------------------------------------
i_pop
(11 missing values generated)

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.427292   .6241396     2.29   0.022     .2040014    2.650584
------------------------------------------------------------------------------
election

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.521615   .6296459     2.42   0.016     .2875319    2.755699
------------------------------------------------------------------------------
proportional

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.308497   .5523996     2.37   0.018     .2258141    2.391181
------------------------------------------------------------------------------
mixed

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.267319   .5495583     2.31   0.021     .1902046    2.344434
------------------------------------------------------------------------------
v2pavote
(135 missing values generated)

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.872785   .8567392     2.19   0.029     .1936075    3.551963
------------------------------------------------------------------------------
v2paseats
(11 missing values generated)

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.651702   .6637845     2.49   0.013     .3507083    2.952696
------------------------------------------------------------------------------
ipolar
(43 missing values generated)

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.237289   .5330142     2.32   0.020     .1926007    2.281978
------------------------------------------------------------------------------
isupdem
(126 missing values generated)

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .3954861   .9560053     0.41   0.679     -1.47825    2.269222
------------------------------------------------------------------------------
priormil

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.511461   .5095358     2.97   0.003     .5127893    2.510133
------------------------------------------------------------------------------
pres

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.344055    .563378     2.39   0.017      .239854    2.448255
------------------------------------------------------------------------------
econcrisis
(63 missing values generated)

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.255668   .5198665     2.42   0.016     .2367488    2.274588
------------------------------------------------------------------------------
gdp
(78 missing values generated)

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.618954    .634946     2.55   0.011     .3744824    2.863425
------------------------------------------------------------------------------
lpop
(63 missing values generated)

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.260196   .5210514     2.42   0.016     .2389541    2.281438
------------------------------------------------------------------------------
oilgas
(63 missing values generated)

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.517296   .5744444     2.64   0.008     .3914059    2.643187
------------------------------------------------------------------------------

.                         format n %9.0g

.                         label define varlab 1  "Party instit." 2 "Initial party i
> nst." 3 "Populism" ///
>                                 4 "Election" 5 `""Proportional" "system""' 6 "Mix
> ed system" 7 `""Ruling party" "leg. seat share""' ///
>                                 8 `""Ruling party" "vote share""' 9 "Polarization
> " 10 `""Citizen support" "for democracy""' 11 "Prior military" ///
>                                 12 "Presidential" 13 "Economic crisis" 14 "GDP pe
> r capita" 15 "Population" 16 "Oil rents" ,replace

.                         label values n varlab,nofix

.                         twoway (scatter beta n if n<=16,mcol(blue)yscale(range(0 
> .06))yline( 1.1992,lcol(gs4)lpat(dash_dot))) ///
>                                 (rspike hi lo n if n<=16,lw(vthin)lcol(blue)ylab(
> -1.5(1)3.5)) ///
>                                 (rspike hi90 lo90 n if n<=16,lcol(blue)lw(medium)
> ytitle("{&beta}{sub:Party personalism}", ///
>                                 size(large)height(4)) scale(.9)tit(Democratic col
> lapse)subtit("Covariate adjustment, within panel model",size(small))   ///
>                                 xtitle(Added covariate,height(0) )yline(0,lpat(da
> sh)lcol(red))xlab(1(1)16,valuelabel angle(90))legend(off))

.                         gr export "$dir\golden\T-DemCollapse-covariates.pdf",as(p
> df)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -DemCollapse-covariates.pdf saved as PDF format

.         
.                 * Too much missingness in citizen support from democracy *
.                 tab gwf_back create if isupdem~=., col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |     Create party
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,264        428 |     1,692 
           |     99.61      97.72 |     99.12 
-----------+----------------------+----------
         1 |         5         10 |        15 
           |      0.39       2.28 |      0.88 
-----------+----------------------+----------
     Total |     1,269        438 |     1,707 
           |    100.00     100.00 |    100.00 

.                 tab gwf_back create if isupdem==., col 

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |     Create party
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |       425        239 |       664 
           |     97.93      95.60 |     97.08 
-----------+----------------------+----------
         1 |         9         11 |        20 
           |      2.07       4.40 |      2.92 
-----------+----------------------+----------
     Total |       434        250 |       684 
           |    100.00     100.00 |    100.00 

.                 reghdfe gwf_back $d ld ivdem time,absorb(cowcode)cluster(lid)
(dropped 3 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,388
Absorbing 1 HDFE group                            F(   4,    588) =       6.40
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1182
                                                  Adj R-squared   =     0.0772
                                                  Within R-sq.    =     0.0270
Number of clusters (lid)     =        589         Root MSE        =     0.1105

                                  (Std. err. adjusted for 589 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
    gwf_back | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0299558   .0168782     1.77   0.076     -.003193    .0631046
          ld |   .0422923   .0095559     4.43   0.000     .0235244    .0610603
       ivdem |  -.0270485   .0083439    -3.24   0.001     -.043436    -.010661
        time |  -.0011212   .0005001    -2.24   0.025    -.0021034    -.000139
       _cons |   .0813137    .051745     1.57   0.117    -.0203137    .1829412
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       103           0         103     |
-----------------------------------------------------+

.                 reghdfe gwf_back $d ld ivdem time if isupdem==.,absorb(cowcode)cl
> uster(lid)
(dropped 11 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        673
Absorbing 1 HDFE group                            F(   4,    190) =       4.68
Statistics robust to heteroskedasticity           Prob > F        =     0.0013
                                                  R-squared       =     0.1970
                                                  Adj R-squared   =     0.0744
                                                  Within R-sq.    =     0.0498
Number of clusters (lid)     =        191         Root MSE        =     0.1511

                                  (Std. err. adjusted for 191 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
    gwf_back | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .1127244   .0724808     1.56   0.122     -.030246    .2556948
          ld |   .0714281   .0210103     3.40   0.001     .0299846    .1128716
       ivdem |  -.0490396   .0193936    -2.53   0.012    -.0872942   -.0107851
        time |  -.0035514   .0011473    -3.10   0.002    -.0058145   -.0012883
       _cons |   .1398813   .1201626     1.16   0.246    -.0971429    .3769054
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        86           0          86     |
-----------------------------------------------------+

.                 reghdfe gwf_back $d ld ivdem time if isupdem~=.,absorb(cowcode)cl
> uster(lid)
(dropped 1 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      1,706
Absorbing 1 HDFE group                            F(   4,    388) =       3.99
Statistics robust to heteroskedasticity           Prob > F        =     0.0035
                                                  R-squared       =     0.0978
                                                  Adj R-squared   =     0.0470
                                                  Within R-sq.    =     0.0108
Number of clusters (lid)     =        389         Root MSE        =     0.0881

                                  (Std. err. adjusted for 389 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
    gwf_back | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0197191   .0150392     1.31   0.191    -.0098495    .0492876
          ld |   .0189886   .0108241     1.75   0.080    -.0022927    .0402699
       ivdem |  -.0123609   .0063629    -1.94   0.053    -.0248709    .0001491
        time |   .0003417   .0005606     0.61   0.543    -.0007605     .001444
       _cons |   .0225063   .0399505     0.56   0.574    -.0560402    .1010528
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        88           0          88     |
-----------------------------------------------------+

.                 reghdfe gwf_back $d ld ivdem time isupdem if isupdem~=.,absorb(co
> wcode)cluster(lid)
(dropped 1 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      1,706
Absorbing 1 HDFE group                            F(   5,    388) =       3.19
Statistics robust to heteroskedasticity           Prob > F        =     0.0078
                                                  R-squared       =     0.0983
                                                  Adj R-squared   =     0.0469
                                                  Within R-sq.    =     0.0114
Number of clusters (lid)     =        389         Root MSE        =     0.0881

                                  (Std. err. adjusted for 389 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
    gwf_back | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0206072   .0151912     1.36   0.176    -.0092603    .0504746
          ld |   .0194731   .0110651     1.76   0.079    -.0022819    .0412281
       ivdem |  -.0129931   .0064127    -2.03   0.043    -.0256012   -.0003851
        time |    .000375   .0005526     0.68   0.498    -.0007115    .0014614
     isupdem |   .0077602   .0062503     1.24   0.215    -.0045286    .0200489
       _cons |   .0236711    .039544     0.60   0.550    -.0540761    .1014184
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        88           0          88     |
-----------------------------------------------------+

.  
.                 ****************************************
.                 * Democratic decay and erosion results *
.                 ****************************************
.                 estout dem1 dem2 dem3 using Ch4-Table1.tex,cells(b(star  fmt(%9.3
> f)) se(par fmt(%9.3f))) ///
>                         stats(N N_clust) style(tex) replace label starlevels(* 0.
> 10 ** 0.05) title(\label{tab1})
(output written to Ch4-Table1.tex)

.                         
.                 ********************
.                 *** CRE collapse ***
.                 ********************
.                 drop xm_*

.                 local var = "persparty i_pop ipolar pres priormil d1 d2 d3 ivdem 
> time time2"

.                 foreach v of local var {
  2.                         egen xm_`v'=mean(`v'),by(cowcode)
  3.                 }
(11 missing values generated)
(43 missing values generated)

.                 global xm = "xm_persparty xm_d1 xm_d2 xm_d3 xm_ivdem xm_time xm_t
> ime2 d1 d2 d3 ivdem time time2"

.                 qui probit gwf_back $xm persparty,cluster(lid)

.                 lincom $d

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |    1.14408   .5704354     2.01   0.045     .0260473    2.262113
------------------------------------------------------------------------------

.                 qui probit gwf_back $xm persparty pres xm_pres,cluster(lid)

.                 lincom $d

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.178617   .5773174     2.04   0.041     .0470953    2.310138
------------------------------------------------------------------------------

.                 lincom pres

 ( 1)  [gwf_back]pres = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1522304   .6444256     0.24   0.813     -1.11082    1.415281
------------------------------------------------------------------------------

.                 qui probit gwf_back $xm persparty priormil xm_priormil,cluster(li
> d)

.                 lincom $d

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.474228    .532706     2.77   0.006     .4301431    2.518312
------------------------------------------------------------------------------

.                 lincom priormil

 ( 1)  [gwf_back]priormil = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   2.295409    .624553     3.68   0.000     1.071307     3.51951
------------------------------------------------------------------------------

.                 qui probit gwf_back $xm persparty i_pop xm_i_pop,cluster(lid)

.                 lincom $d

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   1.301014   .5915739     2.20   0.028     .1415504    2.460477
------------------------------------------------------------------------------

.                 lincom i_pop

 ( 1)  [gwf_back]i_populism = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .8027799   .6194507     1.30   0.195    -.4113212    2.016881
------------------------------------------------------------------------------

.                 qui probit gwf_back $xm persparty ipolar xm_ipolar,cluster(lid)

.                 lincom $d

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |    1.09405   .5378054     2.03   0.042     .0399708    2.148129
------------------------------------------------------------------------------

.                 lincom ipolar

 ( 1)  [gwf_back]ipolar = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .2251728   .1434065     1.57   0.116    -.0558987    .5062443
------------------------------------------------------------------------------

.                 qui probit gwf_back $xm persparty pres xm_pres priormil xm_priorm
> i i_pop xm_i_pop,cluster(lid)

.                 lincom $d

 ( 1)  [gwf_back]persparty = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   2.041285   .5613731     3.64   0.000     .9410141    3.141556
------------------------------------------------------------------------------

.                 lincom pres

 ( 1)  [gwf_back]pres = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .4857592   .7305014     0.66   0.506    -.9459973    1.917516
------------------------------------------------------------------------------

.                 lincom priormil

 ( 1)  [gwf_back]priormil = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   2.370142   .6466771     3.67   0.000     1.102678    3.637606
------------------------------------------------------------------------------

.                 lincom i_pop

 ( 1)  [gwf_back]i_populism = 0

------------------------------------------------------------------------------
    gwf_back | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.2942249   .5476867    -0.54   0.591    -1.367671    .7792214
------------------------------------------------------------------------------

.                 sum $d pres priormil i_pop

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   persparty |      2,391    .5259828    .2246784          0          1
        pres |      2,391    .5018821     .500101          0          1
    priormil |      2,391    .2245922    .4174008          0          1
  i_populism |      2,305    .3830438    .2460328       .033       .993

.                 margins,dydx($d pres priormil i_pop)

Average marginal effects                                 Number of obs = 2,305
Model VCE: Robust

Expression: Pr(gwf_back), predict()
dy/dx wrt:  persparty pres priormil i_populism

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0391399   .0111365     3.51   0.000     .0173127    .0609672
        pres |    .009314   .0141779     0.66   0.511    -.0184742    .0371022
    priormil |   .0454455   .0114385     3.97   0.000     .0230264    .0678646
  i_populism |  -.0056415   .0105319    -0.54   0.592    -.0262837    .0150006
------------------------------------------------------------------------------

.                 mat list r(table)

r(table)[9,4]
         persparty        pres    priormil  i_populism
     b   .03913994   .00931403    .0454455  -.00564152
    se   .01113654   .01417792   .01143855   .01053191
     z   3.5145517   .65693896   3.9730133  -.53565967
pvalue    .0004405   .51122017   .00007097   .59219378
    ll   .01731273  -.01847419   .02302636  -.02628367
    ul   .06096716   .03710224   .06786464   .01500064
    df           .           .           .           .
  crit    1.959964    1.959964    1.959964    1.959964
 eform           0           0           0           0

.                 mat r=r(table)

.                 forval i=1(1)5 {
  2.                         local e = r[1,`i']
  3.                         replace e = `e' if n==`i'
  4.                         local l = r[5,`i']
  5.                         replace lo = `l' if n==`i'
  6.                         local h = r[6,`i']
  7.                         replace hi = `h' if n==`i'
  8.                 }
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(0 real changes made)
(1 real change made, 1 to missing)
(1 real change made, 1 to missing)

.                 twoway (rspike lo hi n if n<=4)  (scatter e n if n<=4,col(gs1)msy
> m(O)yline(0,lcol(red) ///
>                         lpat(solid)) ytit(Marginal effect)xtit("")legend(off)xsca
> le(range(0.8 4.2)) ///
>                         xlab(1 "Party personalism" 2 "Presidential" 3 "Prior mili
> tary" 4 "Populism") ///
>                         tit(Predictors of democratic collapse))

.                         
.         ************************************
.         **** By ruling party seat share ****
.         ************************************
.                         use pers-use,clear

.                         gen decline10 = (v2x_polyarchy - ivdem)<=-.1  if  ivdem~=
> . & v2x_polyarchy~=.

.                         xtset lid year 

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

.                         gen ld10=l.decline10  
(592 missing values generated)

.                         drop b hi* lo*

.                         gen hi5=.
(2,392 missing values generated)

.                         gen lo5=.
(2,392 missing values generated)

.                         gen lo10=.
(2,392 missing values generated)

.                         gen hi10=.
(2,392 missing values generated)

.                         global n=3

.                         
.                         gen major = v2paseats>=50 if v2paseats~=.
(174 missing values generated)

.                         xi: reghdfe v2x_poly i.major*persparty ld ivdem,a(cowcode
>  year)cluster(lid)
i.major           _Imajor_0-1         (naturally coded; _Imajor_0 omitted)
i.major*persp~y   _ImajXpersp_#       (coded as above)
(dropped 3 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,215
Absorbing 2 HDFE groups                           F(   5,    538) =      62.46
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9415
                                                  Adj R-squared   =     0.9377
                                                  Within R-sq.    =     0.4554
Number of clusters (lid)     =        539         Root MSE        =     0.0425

                                   (Std. err. adjusted for 539 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
v2x_polyarchy | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
    _Imajor_1 |   .0138598   .0149154     0.93   0.353    -.0154397    .0431593
    persparty |  -.0137299   .0102971    -1.33   0.183    -.0339572    .0064975
_ImajXpersp_1 |  -.0741683   .0285327    -2.60   0.010    -.1302175   -.0181191
           ld |  -.0044206   .0062929    -0.70   0.483    -.0167822    .0079411
        ivdem |   .7265806   .0596045    12.19   0.000     .6094946    .8436666
        _cons |   .2163515    .034136     6.34   0.000     .1492953    .2834077
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |       101           0         101     |
        year |        30           1          29     |
-----------------------------------------------------+

.                         lincom persparty

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0137299   .0102971    -1.33   0.183    -.0339572    .0064975
------------------------------------------------------------------------------

.                         lincom persparty + _ImajXpersp_1

 ( 1)  persparty + _ImajXpersp_1 = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0878981   .0262819    -3.34   0.001    -.1395259   -.0362704
------------------------------------------------------------------------------

.                         
.                         xi: reghdfe v2x_poly i.major*persparty ld ivdem if pres==
> 1,a(cowcode year)cluster(lid)
i.major           _Imajor_0-1         (naturally coded; _Imajor_0 omitted)
i.major*persp~y   _ImajXpersp_#       (coded as above)
(dropped 3 singleton observations)
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs   =      1,115
Absorbing 2 HDFE groups                           F(   5,    232) =      28.41
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9288
                                                  Adj R-squared   =     0.9226
                                                  Within R-sq.    =     0.4075
Number of clusters (lid)     =        233         Root MSE        =     0.0448

                                   (Std. err. adjusted for 233 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
v2x_polyarchy | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
    _Imajor_1 |   .0390475   .0249891     1.56   0.120     -.010187    .0882819
    persparty |  -.0008855   .0149517    -0.06   0.953     -.030344     .028573
_ImajXpersp_1 |  -.1210774   .0448811    -2.70   0.007    -.2095041   -.0326507
           ld |  -.0044538   .0082497    -0.54   0.590    -.0207077       .0118
        ivdem |   .8614709   .1027894     8.38   0.000     .6589509    1.063991
        _cons |    .102263   .0597265     1.71   0.088    -.0154127    .2199387
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        56           0          56     |
        year |        30           1          29     |
-----------------------------------------------------+

.                         lincom persparty

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0008855   .0149517    -0.06   0.953     -.030344     .028573
------------------------------------------------------------------------------

.                         lincom persparty + _ImajXpersp_1

 ( 1)  persparty + _ImajXpersp_1 = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.1219629    .042761    -2.85   0.005    -.2062125   -.0377133
------------------------------------------------------------------------------

.                         xi: reghdfe v2x_poly i.major*persparty ld ivdem if pres==
> 0,a(cowcode year)cluster(lid)
i.major           _Imajor_0-1         (naturally coded; _Imajor_0 omitted)
i.major*persp~y   _ImajXpersp_#       (coded as above)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      1,100
Absorbing 2 HDFE groups                           F(   5,    307) =      43.77
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9468
                                                  Adj R-squared   =     0.9425
                                                  Within R-sq.    =     0.5306
Number of clusters (lid)     =        308         Root MSE        =     0.0391

                                   (Std. err. adjusted for 308 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
v2x_polyarchy | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
    _Imajor_1 |  -.0111641   .0126329    -0.88   0.378    -.0360221    .0136938
    persparty |  -.0320129   .0137899    -2.32   0.021    -.0591475   -.0048783
_ImajXpersp_1 |  -.0312969    .030999    -1.01   0.313    -.0922942    .0297004
           ld |   .0035589    .010314     0.35   0.730    -.0167363     .023854
        ivdem |   .6402713     .07662     8.36   0.000     .4895044    .7910381
        _cons |   .2814866   .0453384     6.21   0.000     .1922733       .3707
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        48           0          48     |
        year |        30           1          29     |
-----------------------------------------------------+

.                         lincom persparty

 ( 1)  persparty = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0320129   .0137899    -2.32   0.021    -.0591475   -.0048783
------------------------------------------------------------------------------

.                         lincom persparty + _ImajXpersp_1

 ( 1)  persparty + _ImajXpersp_1 = 0

------------------------------------------------------------------------------
v2x_polyar~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0633098   .0293721    -2.16   0.032    -.1211058   -.0055138
------------------------------------------------------------------------------

.                         
.                         ** Plot effects of a move from a low personalism (10pctil
> e) to a high personalism (90pctile) party
.                         centile persparty if v2paseat~=.,centile(10 90)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
   persparty |     2,218         10    .2116281        .2116281    .2116281
             |                   90    .8125014        .7816873    .8125014

.                 interflex v2x_poly persparty v2paseat ld ivdem,fe(cowcode year)cl
> uster(lid)nbin($n)seed($seed)cutoffs(39.9 49.9)
p value of Wald test: 0.0862

.                         mat e=r(estBin)

.                         gen b=.
(2,392 missing values generated)

.                         gen se=.
(2,392 missing values generated)

.                         gen n=_n

.                         gen xdist=.
(2,392 missing values generated)

.                         forval i = 1/$n {
  2.                                 qui replace xdist=e[`i',1] if n==`i'
  3.                                 qui replace b=e[`i',2] if n==`i'
  4.                                 qui replace se=e[`i',3] if n==`i'
  5.                         }

.                         replace hi5  = b+1.96*se
(3 real changes made)

.                         replace hi10 = b+1.65*se
(3 real changes made)

.                         replace lo5  = b-1.96*se
(3 real changes made)

.                         replace lo10 = b-1.65*se
(3 real changes made)

.                         gen rb = round(b,.001)
(2,389 missing values generated)

.                         graph twoway  (rspike hi5 lo5 n if  n<=$n,lcolor(gs1)lwid
> th(thin) ///
>                                 xtitle("Ruling party legislative seat share",size
> (small)height(3)) ///
>                                 yline(0,lp(dash)lcol(red))ytitle("Marginal effect
>  of party personalism", ///
>                                 size(small) height(3))ylab(-.10(.02).00) title("D
> emocratic decay",size(med)))  ///
>                                 (scatter b n if n<=$n,msym(O)mlab(rb) lpattern(so
> lid)lcolor(blue*1.1) ///
>                                 xlab(1 "less than 40%" 2 "40% - 50%" 3 "more than
>  50%")xscale(range(0.75 $n.25))  ///
>                                 legend(lab(1 "95% CI")lab(2 "Marginal effect")  s
> ize(small)pos(7)col(1)ring(0) ///
>                                 order(1 2)))  
(note:  named style med not found in class gsize, default attributes used)

.                         gr export "$dir\golden\Ch4-DemTests-RulingPartySeatShare.
> pdf",as(pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h4-DemTests-RulingPartySeatShare.pdf saved as PDF format

.                         drop xdist n b se

.                 interflex decline10 persparty v2paseat ld ivdem if ld10~=1,fe(cow
> code year)cluster(lid)nbin($n)seed($seed)
p value of Wald test: 0.1197

.                         mat e=r(estBin)

.                         gen b=.
(2,392 missing values generated)

.                         gen se=.
(2,392 missing values generated)

.                         gen xdist=.
(2,392 missing values generated)

.                         gen n=_n

.                         forval i = 1/$n {
  2.                                 qui replace xdist=e[`i',1] if n==`i'
  3.                                 qui replace b=e[`i',2] if n==`i'
  4.                                 qui replace se=e[`i',3] if n==`i'
  5.                         }

.                         replace hi5  = b+1.96*se
(3 real changes made)

.                         replace hi10 = b+1.65*se
(3 real changes made)

.                         replace lo5  = b-1.96*se
(3 real changes made)

.                         replace lo10 = b-1.65*se
(3 real changes made)

.                         local var ="hi5 hi10 lo5 lo10 b"

.                         foreach v of local var {
  2.                                 replace `v'=`v'*.6 /* hi-lo */
  3.                         }
(3 real changes made)
(3 real changes made)
(3 real changes made)
(3 real changes made)
(3 real changes made)

.                         graph twoway  (rspike hi5 lo5 n if  n<=$n,lcolor(gs1)lwid
> th(thin) ///
>                                 xtitle("Ruling party legislative seat share",size
> (small)height(3)) ///
>                                 yline(0,lp(dash)lcol(red))ytitle("Marginal effect
>  of party personalism", ///
>                                 size(small) height(0))ylab(-.02(.02).08) title("D
> emocratic declines",size(med)))  ///
>                                 (scatter b n if n<=$n,msym(O) lpattern(solid)lcol
> or(blue*1.1) ///
>                                 xlab(1 "Lower" 2 "Medium" 3 "Higher")xscale(range
> (0.75 $n.25))  ///
>                                 legend(lab(1 "95% CI")lab(2 "Marginal effect")  s
> ize(small)pos(7)col(1)ring(0) ///
>                                 order(1 2))) (connected  b n if n<=$n,saving(h1.g
> ph,replace)) 
(note:  named style med not found in class gsize, default attributes used)
file h1.gph saved

.                                 drop xdist n b se

.                 interflex gwf_back persparty v2paseat ld ivdem,fe(cowcode year)cl
> uster(lid)nbin($n)seed($seed)
p value of Wald test: 0.1642

.                         mat e=r(estBin)

.                         gen b=.
(2,392 missing values generated)

.                         gen se=.
(2,392 missing values generated)

.                         gen xdist=.
(2,392 missing values generated)

.                         gen n=_n

.                         forval i = 1/$n {
  2.                                 qui replace xdist=e[`i',1] if n==`i'
  3.                                 qui replace b=e[`i',2] if n==`i'
  4.                                 qui replace se=e[`i',3] if n==`i'
  5.                         }

.                         replace hi5  = b+1.96*se
(3 real changes made)

.                         replace hi10 = b+1.65*se
(3 real changes made)

.                         replace lo5  = b-1.96*se
(3 real changes made)

.                         replace lo10 = b-1.65*se
(3 real changes made)

.                         local var ="hi5 hi10 lo5 lo10 b"

.                         foreach v of local var {
  2.                                 replace `v'=`v'*.6  /* 1 hi-lo */
  3.                         }
(3 real changes made)
(3 real changes made)
(3 real changes made)
(3 real changes made)
(3 real changes made)

.                         graph twoway  (rspike hi5 lo5 n if  n<=$n,lcolor(gs1)lwid
> th(thin) ///
>                                 xtitle("Ruling party legislative seat share",size
> (small)height(3)) ///
>                                 yline(0,lp(dash)lcol(red))ytitle("Marginal effect
>  of party personalism", ///
>                                 size(small) height(0))ylab(-.02(.02).08) title("D
> emocratic collpase",size(med)))  ///
>                                 (scatter b n if n<=$n,msym(O) lpattern(solid)lcol
> or(blue*1.1) ///
>                                 xlab(1 "Lower" 2 "Medium" 3 "Higher")xscale(range
> (0.75 $n.25))  ///
>                                 legend(lab(1 "95% CI")lab(2 "Marginal effect")  s
> ize(small)pos(7)col(1)ring(0) ///
>                                 order(1 2))) (connected  b n if n<=$n,saving(h2.g
> ph,replace))
(note:  named style med not found in class gsize, default attributes used)
file h2.gph saved

.                                 drop xdist  b se n

.                         graph combine h1.gph h2.gph , col(2) xsize(8)   
(note:  named style med not found in class gsize, default attributes used)
(note:  named style med not found in class gsize, default attributes used)

.                         gr export "$dir\golden\T-DemTests-RulingPartySeatShare.pd
> f",as(pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -DemTests-RulingPartySeatShare.pdf saved as PDF format

. 
.                         * Adjust for party personalism *
.                         qui interflex v2x_poly persparty v2paseat ld ivdem,fe(cow
> code year)cluster(lid)nbin($n)

.                         mat e=r(estBin)

.                         mat list e

e[3,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1        20.9  -.01691109   .01195956  -.04035139   .00652922
r2       39.55  -.01488694   .01542064  -.04511084   .01533697
r3        54.7  -.05547131   .01896585  -.09264369  -.01829893

.                         qui interflex v2x_poly persparty v2paseat v2xpa_popul ld 
> ivdem,fe(cowcode year)cluster(lid)nbin($n)

.                         mat e=r(estBin)

.                         mat list e

e[3,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1        20.8   -.0138467   .01212765  -.03761646   .00992306
r2        39.6  -.01029594   .01595659  -.04157029   .02097841
r3          55  -.05217132   .01842077  -.08827536  -.01606727

.                         qui interflex gwf_back persparty v2paseat ld ivdem,fe(cow
> code year)cluster(lid)nbin($n)

.                         mat e=r(estBin)

.                         mat list e

e[3,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1        20.9   .01123901   .02066731  -.02926817   .05174618
r2       39.55   .02263543   .02089204   -.0183122   .06358307
r3        54.7   .05272565   .02543397   .00287598   .10257533

.                         qui interflex gwf_back persparty v2paseat v2xpa_popul ld 
> ivdem,fe(cowcode year)cluster(lid)nbin($n)

.                         mat e=r(estBin)

.                         mat list e

e[3,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1        20.8    .0104187    .0208273  -.03040206   .05123946
r2        39.6   .02107852   .02119162   -.0204563   .06261335
r3          55   .05142139   .02525559   .00192135   .10092143

.                         
.                 *****************************************
.                 *** Interaction by executive approval ***
.                 *****************************************
.                         use "$dir\eap.dta",clear

.                         drop if year<1990
(463 observations deleted)

.                         egen cid=group(country)

.                         tsset cid year

Panel variable: cid (unbalanced)
 Time variable: year, 1990 to 2019
         Delta: 1 unit

.                         forval i = 1/3 {
  2.                                 gen l`i'approval = l`i'.approval_not_smoothed
  3.                         }
(129 missing values generated)
(196 missing values generated)
(263 missing values generated)

.                         replace country = "Bulgaria" if country=="Bulgaria_EXEC"
(29 real changes made)

.                         replace country = "Czech Republic" if country=="Czech Rep
> ublic_EXEC"
(29 real changes made)

.                         replace country = "France" if country=="France_EXEC"
(30 real changes made)

.                         replace country = "Macedonia" if country=="Macedonia_EXEC
> "
(11 real changes made)

.                         replace country = "Poland" if country=="Poland_EXEC"
(30 real changes made)

.                         replace country = "Portugal" if country=="Portugal_EXEC"
(29 real changes made)

.                         replace country = "Russia" if country=="Russian Federatio
> n_EXEC"
(24 real changes made)

.                         replace country = "Turkey" if country=="Turkey_EXEC"
(17 real changes made)

.                         replace country = "Ukraine" if country=="Ukraine_EXEC"
(18 real changes made)

.                         gen cowcode =.
(1,757 missing values generated)

.                         qui do cowcodes

.                         sort cowcode year

.                         merge cowcode year using "$dir\pers-use.dta"
(you are using old merge syntax; see [D] merge for new syntax)
variables cowcode year do not uniquely identify observations in the master data
(note: variable ccode was int in the using data, but will be str23 now)
(variable country was str23, now str45 to accommodate using data's values)
(variable year was int, now double to accommodate using data's values)
(variable cowcode was float, now double to accommodate using data's values)

.                         tab country if _merge==1 & year>1990

                                Country |      Freq.     Percent        Cum.
----------------------------------------+-----------------------------------
                            Bulgaria_PM |         28        3.97        3.97
                          Bulgaria_PRES |         28        3.97        7.93
                         Czech Republic |          5        0.71        8.64
                     Czech Republic_Gov |         28        3.97       12.61
                      Czech Republic_PM |         21        2.97       15.58
                    Czech Republic_Pres |         28        3.97       19.55
                             ElSalvador |         29        4.11       23.65
                              France_PM |         29        4.11       27.76
                            France_Pres |         29        4.11       31.87
                                 Greece |          1        0.14       32.01
                              Guatemala |          5        0.71       32.72
                             Ireland_PM |         28        3.97       36.69
                                  Italy |          5        0.71       37.39
                                  Korea |         28        3.97       41.36
                                 Kosovo |         12        1.70       43.06
                                 Mexico |         10        1.42       44.48
                             Montenegro |         15        2.12       46.60
                              Nicaragua |          2        0.28       46.88
                              Palestine |         24        3.40       50.28
                                   Peru |          9        1.27       51.56
                           Phillippines |         28        3.97       55.52
                              Poland_PM |         28        3.97       59.49
                            Poland_Pres |         29        4.11       63.60
                           Portugal_Gov |         28        3.97       67.56
                            Portugal_PM |         28        3.97       71.53
                          Portugal_Pres |         28        3.97       75.50
                                 Russia |         24        3.40       78.90
                 Russian Federation_GOV |         20        2.83       81.73
                  Russian Federation_PM |         24        3.40       85.13
                Russian Federation_Pres |         24        3.40       88.53
                                 Turkey |          2        0.28       88.81
                             Turkey_Gov |         13        1.84       90.65
                              Turkey_PM |         15        2.12       92.78
                            Turkey_Pres |          5        0.71       93.48
                                Ukraine |          2        0.28       93.77
                            Ukraine_Gov |          8        1.13       94.90
                             Ukraine_PM |          4        0.57       95.47
                           Ukraine_Pres |         18        2.55       98.02
                              Venezuela |         14        1.98      100.00
----------------------------------------+-----------------------------------
                                  Total |        706      100.00

.                         drop if GNB==1
(1 observation deleted)

.                         sort lid year

.                         gen repeat =year==year[_n-1] if lid==lid[_n-1]
(593 missing values generated)

.                         drop if repeat==1
(731 observations deleted)

.                         drop repeat

.                         corr l1approval v2paseat v2pavote
(obs=888)

             | l1appr~l v2pase~e v2pavote
-------------+---------------------------
  l1approval |   1.0000
v2paseatsh~e |   0.1519   1.0000
    v2pavote |   0.1790   0.9001   1.0000


.                         
.                         gen opolar = l1polar if year==min
(1,852 missing values generated)

.                         egen ipolar = max(opolar),by(lid)
(116 missing values generated)

.                         
.                         * Biased sample with nonmissing data on executive approva
> l *
.                         gen missapproval =  l1approval==. if persparty~=.
(30 missing values generated)

.                         ttest ivdem,by(miss)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     946    .7967844    .0039681    .1220459    .7889971    .8045716
       1 |   1,445    .6582394    .0045271    .1720876    .6493591    .6671198
---------+--------------------------------------------------------------------
Combined |   2,391    .7130548    .0034448    .1684444    .7062996    .7198099
---------+--------------------------------------------------------------------
    diff |            .1385449     .006451                .1258948     .151195
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  21.4766
H0: diff = 0                                     Degrees of freedom =     2389

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                         ttest ld,by(miss)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     946    3.505967    .0288177    .8863507    3.449413    3.562521
       1 |   1,445    2.699654     .028893    1.098316    2.642977    2.756331
---------+--------------------------------------------------------------------
Combined |   2,391    3.018672    .0223558     1.09315    2.974833    3.062511
---------+--------------------------------------------------------------------
    diff |             .806313    .0426486                 .722681     .889945
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  18.9060
H0: diff = 0                                     Degrees of freedom =     2389

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                         ttest persparty,by(miss)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     946     .475738    .0070356    .2163941    .4619308    .4895452
       1 |   1,445    .5588767    .0058923    .2239866    .5473182    .5704352
---------+--------------------------------------------------------------------
Combined |   2,391    .5259828    .0045949    .2246784    .5169725    .5349931
---------+--------------------------------------------------------------------
    diff |           -.0831387    .0092434               -.1012646   -.0650128
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -8.9944
H0: diff = 0                                     Degrees of freedom =     2389

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

.                         ttest gwf_back,by(miss)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     946    .0063425    .0025825    .0794288    .0012745    .0114105
       1 |   1,445    .0193772    .0036275    .1378943    .0122613     .026493
---------+--------------------------------------------------------------------
Combined |   2,391      .01422    .0024218    .1184215    .0094709    .0189691
---------+--------------------------------------------------------------------
    diff |           -.0130347    .0049465               -.0227346   -.0033347
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -2.6351
H0: diff = 0                                     Degrees of freedom =     2389

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0042         Pr(|T| > |t|) = 0.0085          Pr(T > t) = 0.9958

. 
.                         gen elect_exec = (v2xel_elecparl==1 & pres==0) |  (v2xel_
> elecpres==1 & pres==1)

.                         tab elect_exec

 elect_exec |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      1,859       76.79       76.79
          1 |        562       23.21      100.00
------------+-----------------------------------
      Total |      2,421      100.00

.  
.                         interflex v2x_poly persparty v2paseats ivdem ld elect_exe
> c, ///
>                                 fe(cowcode year leadertime)cluster(lid)nbin(3)cut
> offs(39.9 49.9) 
p value of Wald test: 0.0856

.                         mat e1=r(estBin)

.                         interflex v2x_poly persparty v2paseats ivdem ld elect_exe
> c if l1approval~=., ///
>                                 fe(cowcode year leadertime)cluster(lid)nbin(3)cut
> offs(39.9 49.9)  
p value of Wald test: 0.4983

.                         mat e2=r(estBin)

.                         interflex v2x_poly persparty l1approval ivdem ld elect_ex
> ec if l1approval~=., ///
>                                 fe(cowcode year leadertime)cluster(lid)nbin(3)cut
> offs(39.9 49.9)  
p value of Wald test: 0.0071

.                         mat e3=r(estBin)

.                         * Reported models in Table 4.2 *
.                         forval i=1/3 {
  2.                                 mat list e`i'
  3.                         }

e1[3,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1          26  -.01107741     .012065  -.03472437   .01256956
r2        44.9  -.02907605   .01548613  -.05942831   .00127621
r3        55.9  -.05834731   .02249493  -.10243657  -.01425806

e2[3,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1        29.1   .00707819   .01473638  -.02180458   .03596096
r2       45.85  -.04022057   .02444854  -.08813883   .00769769
r3          55  -.05999532   .02397149  -.10697858  -.01301206

e3[3,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1   33.364279  -.01196781   .01691059  -.04511195   .02117633
r2   44.664261  -.03914012   .01930181  -.07697098  -.00130926
r3   56.092701  -.01507905   .02061315  -.05548007   .02532197

.                         gen persXseats = persparty*v2paseats
(204 missing values generated)

.                         interflex v2x_poly persparty l1approval ivdem ld elect_ex
> ec v2paseat persXseats if l1approval~=.,  ///
>                                 fe(cowcode year leadertime)cluster(lid)nbin(3)cut
> offs(39.9 49.9)
p value of Wald test: 0.5619

.                                 
.                         * Check whether seat share boost beyond approval is assoc
> iated with democratic decline *
.                         reg v2paseats l1approval

      Source |       SS           df       MS      Number of obs   =       914
-------------+----------------------------------   F(1, 912)       =     18.58
       Model |  4068.59385         1  4068.59385   Prob > F        =    0.0000
    Residual |  199750.696       912  219.024885   R-squared       =    0.0200
-------------+----------------------------------   Adj R-squared   =    0.0189
       Total |  203819.289       913  223.241281   Root MSE        =    14.799

------------------------------------------------------------------------------
v2paseatsh~e | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
  l1approval |   .1731834   .0401819     4.31   0.000     .0943236    .2520432
       _cons |   32.53155    1.80387    18.03   0.000     28.99133    36.07177
------------------------------------------------------------------------------

.                         predict res if e(sample),res
(1,507 missing values generated)

.                         gen devdem = v2x_poly -ivdem
(30 missing values generated)

.                         twoway lpolyci devdem res, legend(off)

.                         krls devdem res
Iteration =  1, Looloss: 42.36125  
Iteration =  2, Looloss: 41.60844  
Iteration =  3, Looloss: 40.81615  
Iteration =  4, Looloss: 40.02991  
Iteration =  5, Looloss: 39.2871   
Iteration =  6, Looloss: 38.61915  
Iteration =  7, Looloss: 38.04903  
Iteration =  8, Looloss: 37.58593  
Iteration =  9, Looloss: 37.22447  
Iteration = 10, Looloss: 36.94916  
Iteration = 11, Looloss: 36.74047  
Iteration = 12, Looloss: 36.57978  
Iteration = 13, Looloss: 36.45228  
Iteration = 14, Looloss: 36.34825  
Iteration = 15, Looloss: 36.26274  
Iteration = 16, Looloss: 36.19393  

Pointwise Derivatives                               Number of obs =      914 
                                                    Lambda        =      .41 
                                                    Tolerance     =     .914 
                                                    Sigma         =        1 
                                                    Eff. df       =    8.637 
                                                    R2            =    .2176 
                                                    Looloss       =     36.1

devdem |      Avg.       SE        t    P>|t|        P25       P50       P75       
-------+--------------------------------------------------------------------
   res | -.001485   .000124  -11.985    0.000   -.001167  -.000801  -.000487  
-------+--------------------------------------------------------------------


.                         reg devdem res,cluster(lid)

Linear regression                               Number of obs     =        914
                                                F(1, 215)         =      12.03
                                                Prob > F          =     0.0006
                                                R-squared         =     0.1034
                                                Root MSE          =     .04649

                                  (Std. err. adjusted for 216 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
      devdem | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         res |  -.0010671   .0003077    -3.47   0.001    -.0016735   -.0004607
       _cons |  -.0140022   .0036919    -3.79   0.000    -.0212791   -.0067253
------------------------------------------------------------------------------

.                         drop res

.                         reg v2paseats v2pavote

      Source |       SS           df       MS      Number of obs   =     1,935
-------------+----------------------------------   F(1, 1933)      =   9649.15
       Model |  485813.763         1  485813.763   Prob > F        =    0.0000
    Residual |  97322.3679     1,933  50.3478365   R-squared       =    0.8331
-------------+----------------------------------   Adj R-squared   =    0.8330
       Total |  583136.131     1,934  301.518165   Root MSE        =    7.0956

------------------------------------------------------------------------------
v2paseatsh~e | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    v2pavote |   1.143589   .0116419    98.23   0.000     1.120757    1.166421
       _cons |   .7957782   .4181197     1.90   0.057    -.0242348    1.615791
------------------------------------------------------------------------------

.                         predict res if e(sample),res
(486 missing values generated)

.                         krls devdem res

Pointwise Derivatives                               Number of obs =     1935 
                                                    Lambda        =    480.2 
                                                    Tolerance     =    1.935 
                                                    Sigma         =        1 
                                                    Eff. df       =    1.822 
                                                    R2            =  .006488 
                                                    Looloss       =    95.18

devdem |      Avg.       SE        t    P>|t|        P25       P50       P75       
-------+--------------------------------------------------------------------
   res |  -.00034   .000096   -3.523    0.000   -.000541  -.000437  -.000289  
-------+--------------------------------------------------------------------


.                         reg devdem res,cluster(lid)

Linear regression                               Number of obs     =      1,935
                                                F(1, 491)         =       3.76
                                                Prob > F          =     0.0532
                                                R-squared         =     0.0051
                                                Root MSE          =     .04932

                                  (Std. err. adjusted for 492 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
      devdem | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         res |  -.0004977   .0002568    -1.94   0.053    -.0010022    6.79e-06
       _cons |  -.0075504   .0025324    -2.98   0.003    -.0125262   -.0025746
------------------------------------------------------------------------------

.                         drop res        

.                         
.                         * Check legislative seat share moderation by system type 
> *
.                         gen lnleader = ln(1+leadertime)
(77 missing values generated)

.                         interflex v2x_poly persparty v2paseats ivdem ld elect_exe
> c lnleader,fe(cowcode year)cluster(lid)nbin(2)cutoffs(51)
p value of Wald test: 0.0077

.                         mat list r(estBin)

r(estBin)[2,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1        32.5  -.01707408    .0106933  -.03803257   .00388441
r2        57.4  -.06847116   .02480168  -.11708157  -.01986076

.                         interflex v2x_poly persparty v2paseats ivdem ld elect_exe
> c lnleader if pres==0,fe(cowcode year)cluster(lid)nbin(2)cutoffs(51)
p value of Wald test: 0.0000

.                         mat list r(estBin)

r(estBin)[2,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1        31.6  -.03009734   .01389852  -.05733794  -.00285675
r2        57.5  -.05954039   .02675277  -.11197485  -.00710593

.                         interflex v2x_poly persparty v2paseats ivdem ld elect_exe
> c lnleader if pres==1,fe(cowcode year)cluster(lid)nbin(2)cutoffs(51)
p value of Wald test: 0.4411

.                         mat list r(estBin)

r(estBin)[2,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1        33.3  -.00728871   .01473485  -.03616848   .02159106
r2        56.7   -.0994346   .04215043  -.18204792  -.01682128

.                         interflex v2x_poly persparty v2paseats ivdem ld elect_exe
> c lnleader if v2elparlel==0,fe(cowcode year)cluster(lid)nbin(2)cutoffs(51)
p value of Wald test: 0.0577

.                         mat list r(estBin)

r(estBin)[2,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1        37.6  -.01223548   .02097106  -.05333801   .02886705
r2        58.9   -.0380429   .02797492  -.09287275   .01678694

.                         interflex v2x_poly persparty v2paseats ivdem ld elect_exe
> c lnleader if v2elparlel==1 | v2elparlel==3, ///
>                                 fe(cowcode year)cluster(lid)nbin(2)cutoffs(51)
p value of Wald test: 0.1712

.                         mat list r(estBin)

r(estBin)[2,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1        31.1  -.00092298   .01032389  -.02115743   .01931146
r2       55.45  -.04139839   .05268925  -.14466741   .06187064

.                         interflex v2x_poly persparty v2paseats ivdem ld elect_exe
> c lnleader if v2elparlel==2,fe(cowcode year)cluster(lid)nbin(2)cutoffs(51)
p value of Wald test: 0.2541

.                         mat list r(estBin)

r(estBin)[2,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1        38.3  -.05418879   .02954923  -.11210422   .00372664
r2        61.6   -.1492124   .04234254  -.23220225  -.06622256

.                         
.                         * 5 collapses with nonmissing data on approval *
.                         tab gwf_back create if l1approval~=.,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |        create
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |       717        223 |       940 
           |     99.86      97.81 |     99.37 
-----------+----------------------+----------
         1 |         1          5 |         6 
           |      0.14       2.19 |      0.63 
-----------+----------------------+----------
     Total |       718        228 |       946 
           |    100.00     100.00 |    100.00 

.                         tab gwf_back create if l1approval==.,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |        create
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |       972        445 |     1,417 
           |     98.68      96.74 |     98.06 
-----------+----------------------+----------
         1 |        13         15 |        28 
           |      1.32       3.26 |      1.94 
-----------+----------------------+----------
     Total |       985        460 |     1,445 
           |    100.00     100.00 |    100.00 

.                         interflex gwf_back persparty l1approval ivdem ld,fe(cowco
> de year)cluster(lid)type(kernel)bw(60)seed($seed)

. 
.                 *******************************
.                 **** Coups and power-grabs ****
.                 *******************************
.                 use pers-use,clear

.                 drop if persparty==.
(0 observations deleted)

.                 * Update for collapse in 2020 *
.                 recode gwf_back (0=1) if year==2020 & (country=="Mali")
(1 changes made to gwf_back)

.                 * GNB 2012: non-personalist leader dies a naturual death 9 Jan 20
> 12; 
.                 * interim president takes over and their is a coup in April 
.                 * drop the interim leader who is unelected *
.                 drop if GNB==1
(1 observation deleted)

.                 gen backtype=""
(2,391 missing values generated)

.                 replace backtype ="rebellion" if country=="Afghanistan" & year==2
> 019
variable backtype was str1 now str9
(1 real change made)

.                 replace backtype ="powergrab" if country=="Armenia" & year==1994
(1 real change made)

.                 replace backtype ="rebellion" if country=="Azerbaijan" & year==19
> 93
(1 real change made)

.                 replace backtype ="powergrab" if country=="Bangladesh" & year==20
> 14
(1 real change made)

.                 replace backtype ="powergrab" if country=="Benin" & year==2019
(1 real change made)

.                 replace backtype ="coup" if country=="Bolivia" & year==2019
(1 real change made)

.                 replace backtype ="coup" if country=="Burundi" & year==1996
(1 real change made)

.                 replace backtype ="powergrab" if country=="Burundi" & year==2010
(1 real change made)

.                 replace backtype ="rebellion" if country=="Central African Republ
> ic" & year==2003
(1 real change made)

.                 replace backtype ="coup" if country=="Egypt" & year==2013
(1 real change made)

.                 replace backtype ="powergrab" if country=="Guinea Bissau" & year=
> =2002
(1 real change made)

.                 replace backtype ="powergrab" if country=="Haiti" & year==1999
(1 real change made)

.                 replace backtype ="powergrab" if country=="Hungary" & year==2018
(1 real change made)

.                 replace backtype ="coup" if country=="Madagascar" & year==2009
(1 real change made)

.                 replace backtype ="coup" if country=="Mali" & year==2012
(1 real change made)

.                 replace backtype ="coup" if country=="Mali" & year==2020
(1 real change made)

.                 replace backtype ="coup" if country=="Mauritania" & year==2008
(1 real change made)

.                 *replace backtype ="coup" if country=="Nepal" & year==2002
.                 replace backtype ="powergrab" if country=="Nicaragua" & year==201
> 6
(1 real change made)

.                 replace backtype ="coup" if country=="Niger" & year==1996
(1 real change made)

.                 replace backtype ="powergrab" if country=="Niger" & year==2009
(1 real change made)

.                 replace backtype ="coup" if country=="Pakistan" & year==1999
(1 real change made)

.                 replace backtype ="powergrab" if country=="Peru" & year==1992
(1 real change made)

.                 replace backtype ="rebellion" if country=="Republic of Congo" & y
> ear==1997
(1 real change made)

.                 replace backtype ="powergrab" if country=="Russia" & year==1993
(1 real change made)

.                 replace backtype ="powergrab" if country=="Serbia" & year==2018
(1 real change made)

.                 replace backtype ="rebellion" if country=="Sierra Leone" & year==
> 1997
(1 real change made)

.                 replace backtype ="powergrab" if country=="Sri Lanka" & year==201
> 0
(1 real change made)

.                 replace backtype ="powergrab" if country=="Sri Lanka" & year==202
> 0
(1 real change made)

.                 replace backtype ="coup" if country=="Thailand" & year==1991
(1 real change made)

.                 replace backtype ="coup" if country=="Thailand" & year==2006
(1 real change made)

.                 replace backtype ="coup" if country=="Thailand" & year==2014
(1 real change made)

.                 replace backtype ="powergrab" if country=="Turkey" & year==2016
(1 real change made)

.                 replace backtype ="powergrab" if country=="Ukraine" & year==2012
(1 real change made)

.                 replace backtype ="powergrab" if country=="Venezuela" & year==200
> 5
(1 real change made)

.                 replace backtype ="powergrab" if country=="Zambia" & year==1996
(1 real change made)

.                 gen coupback = backtype=="coup"  if gwf_back~=.

.                 gen grabback = backtype=="powergrab"  if gwf_back~=.    

.                 tab coupback grabback if gwf_back==1,row col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
|  row percentage   |
| column percentage |
+-------------------+

           |       grabback
  coupback |         0          1 |     Total
-----------+----------------------+----------
         0 |         6         17 |        23 
           |     26.09      73.91 |    100.00 
           |     33.33     100.00 |     65.71 
-----------+----------------------+----------
         1 |        12          0 |        12 
           |    100.00       0.00 |    100.00 
           |     66.67       0.00 |     34.29 
-----------+----------------------+----------
     Total |        18         17 |        35 
           |     51.43      48.57 |    100.00 
           |    100.00     100.00 |    100.00 

.                         gen e=. 
(2,391 missing values generated)

.                         gen hi=.
(2,391 missing values generated)

.                         gen lo=.
(2,391 missing values generated)

.                         gen n =_n

.                         gen hipers = persparty>.545 if persparty~=.              
>        

.                         tab gwf_back hipers,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |        hipers
  gwf_back |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,271      1,085 |     2,356 
           |     99.53      97.40 |     98.54 
-----------+----------------------+----------
         1 |         6         29 |        35 
           |      0.47       2.60 |      1.46 
-----------+----------------------+----------
     Total |     1,277      1,114 |     2,391 
           |    100.00     100.00 |    100.00 

.                         ttest gwf_back,by(hipers)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,277    .0046985    .0019144    .0684113    .0009428    .0084542
       1 |   1,114    .0260323    .0047729    .1593029    .0166674    .0353972
---------+--------------------------------------------------------------------
Combined |   2,391    .0146382    .0024566    .1201249    .0098208    .0194556
---------+--------------------------------------------------------------------
    diff |           -.0213338    .0049064               -.0309551   -.0117125
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -4.3481
H0: diff = 0                                     Degrees of freedom =     2389

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.96* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.96* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.96*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.96*`se2' if _n==2                  
>        
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit(Probab
> ility of democratic collapse)saving(h1.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.01).04)col(gs1)le
> gend(off)xtit("")tit(Democratic collapse) ///
>                                 xlab(1 "Low (6)" 2 "High (29)")xscale(range(.8 2.
> 2)))
file h1.gph saved

.                         tab coupback hipers,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |        hipers
  coupback |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,276      1,103 |     2,379 
           |     99.92      99.01 |     99.50 
-----------+----------------------+----------
         1 |         1         11 |        12 
           |      0.08       0.99 |      0.50 
-----------+----------------------+----------
     Total |     1,277      1,114 |     2,391 
           |    100.00     100.00 |    100.00 

.                         ttest coupback,by(hipers)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,277    .0007831    .0007831    .0279837   -.0007532    .0023194
       1 |   1,114    .0098743    .0029638    .0989222     .004059    .0156896
---------+--------------------------------------------------------------------
Combined |   2,391    .0050188    .0014455    .0706804    .0021843    .0078533
---------+--------------------------------------------------------------------
    diff |           -.0090912    .0028923               -.0147629   -.0034195
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -3.1432
H0: diff = 0                                     Degrees of freedom =     2389

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0008         Pr(|T| > |t|) = 0.0017          Pr(T > t) = 0.9992

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.96* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.96* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.96*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.96*`se2' if _n==2                  
>        
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit("Proba
> bility of coup collapse")saving(h2.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.005).02)col(gs1)l
> egend(off)xtit("")tit(Military coup collapse) ///
>                                 xlab(1 "Low (1)" 2 "High(11)")xscale(range(.8 2.2
> )))
file h2.gph saved

.                         tab grabback hipers,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |        hipers
  grabback |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,274      1,099 |     2,373 
           |     99.77      98.65 |     99.25 
-----------+----------------------+----------
         1 |         3         15 |        18 
           |      0.23       1.35 |      0.75 
-----------+----------------------+----------
     Total |     1,277      1,114 |     2,391 
           |    100.00     100.00 |    100.00 

.                         ttest grabback,by(hipers)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,277    .0023493    .0013553    .0484311   -.0003096    .0050081
       1 |   1,114     .013465    .0034547    .1153066    .0066865    .0202435
---------+--------------------------------------------------------------------
Combined |   2,391    .0075282    .0017681    .0864562    .0040611    .0109954
---------+--------------------------------------------------------------------
    diff |           -.0111157    .0035379               -.0180534   -.0041781
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -3.1419
H0: diff = 0                                     Degrees of freedom =     2389

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0008         Pr(|T| > |t|) = 0.0017          Pr(T > t) = 0.9992

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.95* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.95* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.95*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.95*`se2' if _n==2                  
>        
(1 real change made)

.                         twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit(Probab
> ility of power-grab collapse)saving(h3.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(0(.005).02)col(gs1)l
> egend(off)xtit("")tit(Power-grab collapse) ///
>                                 xlab(1 "Low (3)" 2 "High (15)")xscale(range(.8 2.
> 2)))
file h3.gph saved

.                         gr combine h1.gph h2.gph h3.gph, xsize(4)ysize(2)col(3)su
> btit(Party personalism,pos(6))

.                         gr export "$dir\golden\Ch4-Powergrab-Coup-collapse-ttests
> .pdf",as(pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h4-Powergrab-Coup-collapse-ttests.pdf saved as PDF format

.                         
.                         *** Democratic collapse via rebellion ***
.                         list country current_leader year backtype hipers perspart
> y if gwf_back==1 & coupback==0 & grabback==0

      +---------------------------------------------------------------------------+
1377. |                  country |     current_leader | year |  backtype | hipers |
      |               Azerbaijan |   Abulfaz Elchibey | 1993 | rebellion |      1 |
      |---------------------------------------------------------------------------|
      |                                 perspa~y                                  |
      |                                 .8125014                                  |
      +---------------------------------------------------------------------------+

      +---------------------------------------------------------------------------+
1682. |                  country |     current_leader | year |  backtype | hipers |
      |             Sierra Leone | Ahmad Tejan Kabbah | 1997 | rebellion |      0 |
      |---------------------------------------------------------------------------|
      |                                 perspa~y                                  |
      |                                 .4819592                                  |
      +---------------------------------------------------------------------------+

      +---------------------------------------------------------------------------+
1755. |                  country |     current_leader | year |  backtype | hipers |
      | Central African Republic | Ange-Felix Patasse | 2003 | rebellion |      1 |
      |---------------------------------------------------------------------------|
      |                                 perspa~y                                  |
      |                                 .8906565                                  |
      +---------------------------------------------------------------------------+

      +---------------------------------------------------------------------------+
1760. |                  country |     current_leader | year |  backtype | hipers |
      |        Republic of Congo |    Pascal Lissouba | 1997 | rebellion |      1 |
      |---------------------------------------------------------------------------|
      |                                 perspa~y                                  |
      |                                        1                                  |
      +---------------------------------------------------------------------------+

      +---------------------------------------------------------------------------+
2023. |                  country |     current_leader | year |  backtype | hipers |
      |              Afghanistan |       Ashraf Ghani | 2019 | rebellion |      1 |
      |---------------------------------------------------------------------------|
      |                                 perspa~y                                  |
      |                                        1                                  |
      +---------------------------------------------------------------------------+

      +---------------------------------------------------------------------------+
2244. |                  country |     current_leader | year |  backtype | hipers |
      |                    Nepal | Sher Bahadur Deuba | 2002 |           |      0 |
      |---------------------------------------------------------------------------|
      |                                 perspa~y                                  |
      |                                 .2116281                                  |
      +---------------------------------------------------------------------------+

.                         ** 1 personalist party score just below the median but ot
> her 4 are in the 90th percentile or above **
.                         
.                         *** Change in democracy prior to collapse events ***
.                         gen rebelback = backtype=="rebellion"

.                         drop max*

.                         egen maxyr = max(year),by(lid)

.                         gen l1devdem = l1v2x_poly-ivdem
(1 missing value generated)

.                         gen maxdev = l1devdem if year==maxyr
(1,799 missing values generated)

.                         
.                         ttest maxdev if rebelback==0 & coupback==0,by(grabback)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     557   -.0046553    .0016044    .0378642   -.0078066    -.001504
       1 |      18   -.0688333     .026166    .1110131   -.1240389   -.0136278
---------+--------------------------------------------------------------------
Combined |     575   -.0066643    .0018076    .0433457   -.0102147   -.0031139
---------+--------------------------------------------------------------------
    diff |             .064178    .0100376                 .044463     .083893
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   6.3938
H0: diff = 0                                     Degrees of freedom =      573

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                         ttest maxdev if rebelback==0 & grabback==0,by(coupback)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     557   -.0046553    .0016044    .0378642   -.0078066    -.001504
       1 |      12   -.0285833    .0141349    .0489647    -.059694    .0025273
---------+--------------------------------------------------------------------
Combined |     569   -.0051599    .0016028    .0382319    -.008308   -.0020119
---------+--------------------------------------------------------------------
    diff |             .023928    .0111194                .0020878    .0457682
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   2.1519
H0: diff = 0                                     Degrees of freedom =      567

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.9841         Pr(|T| > |t|) = 0.0318          Pr(T > t) = 0.0159

.                         ttest maxdev if grabback==0  & coupback==0,by(rebelback)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     557   -.0046553    .0016044    .0378642   -.0078066    -.001504
       1 |       5      -.0122    .0059699    .0133491   -.0287752    .0043752
---------+--------------------------------------------------------------------
Combined |     562   -.0047224    .0015911    .0377186   -.0078476   -.0015973
---------+--------------------------------------------------------------------
    diff |            .0075447    .0169559               -.0257603    .0408497
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   0.4450
H0: diff = 0                                     Degrees of freedom =      560

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.6717         Pr(|T| > |t|) = 0.6565          Pr(T > t) = 0.3283

. 
.                         *** 
.                         gen time = year-1990

.                         gen xtime = time/10

.                         gen xivdem=ivdem*10

.                         local var = "ld xivdem persparty xtime"

.                         foreach v of local var {
  2.                                 egen xm_`v'=mean(`v'),by(cowcode)
  3.                         }

.                         xthybrid grabback xivdem ld persparty xtime,cluster(cowco
> de)vce(cluster cowcode)family(binomial)link(probit)p


Hybrid model. Family: binomial. Link: probit.

+-----------------------------------+
|             Variable |   model    |
|----------------------+------------|
| grabback             |            |
|            W__xivdem |    -0.5410 |
|                      |     0.0005 |
|                W__ld |     1.1256 |
|                      |     0.0012 |
|         W__persparty |     1.2704 |
|                      |     0.0585 |
|             W__xtime |     0.0289 |
|                      |     0.9207 |
|            B__xivdem |    -0.0392 |
|                      |     0.5273 |
|                B__ld |    -0.7255 |
|                      |     0.0133 |
|         B__persparty |    -0.0090 |
|                      |     0.9879 |
|             B__xtime |    -0.7505 |
|                      |     0.0030 |
|                _cons |     0.4339 |
|                      |     0.5658 |
|----------------------+------------|
|   var(_cons[cowcode])|            |
|                _cons |     0.0000 |
|                      |     0.1033 |
|----------------------+------------|
| Statistics           |            |
|                   ll |   -75.1538 |
|                 chi2 |    52.6339 |
|                    p |     0.0000 |
|                  aic |   168.3077 |
|                  bic |   220.3229 |
+-----------------------------------+
                          Legend: b/p
Level 1: 2391 units. Level 2: 106 units.

.                         est store coup1

.                         probit grabback ld xivdem persparty xtime xm_*,cluster(li
> d)

Iteration 0:  Log pseudolikelihood = -105.93579  
Iteration 1:  Log pseudolikelihood =  -83.44378  
Iteration 2:  Log pseudolikelihood = -75.994626  
Iteration 3:  Log pseudolikelihood = -75.175656  
Iteration 4:  Log pseudolikelihood = -75.153846  
Iteration 5:  Log pseudolikelihood = -75.153843  

Probit regression                                       Number of obs =  2,391
                                                        Wald chi2(8)  =  48.80
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -75.153843                       Pseudo R2     = 0.2906

                                  (Std. err. adjusted for 592 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
    grabback | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
          ld |   1.125626    .382575     2.94   0.003     .3757933     1.87546
      xivdem |  -.5410167   .1647266    -3.28   0.001    -.8638749   -.2181585
   persparty |   1.270363   .7154115     1.78   0.076    -.1318178    2.672544
       xtime |   .0288844    .268285     0.11   0.914    -.4969445    .5547133
       xm_ld |  -1.851121   .4715641    -3.93   0.000     -2.77537   -.9268722
   xm_xivdem |   .5018381   .1873793     2.68   0.007     .1345814    .8690948
xm_persparty |  -1.279372   .9074226    -1.41   0.159    -3.057887    .4991437
    xm_xtime |   -.779348   .4029469    -1.93   0.053    -1.569109    .0104135
       _cons |   .4339392   .8282161     0.52   0.600    -1.189335    2.057213
------------------------------------------------------------------------------

.                         est store coup2

.                         margins,dydx(persparty)

Average marginal effects                                 Number of obs = 2,391
Model VCE: Robust

Expression: Pr(grabback), predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0200808   .0125442     1.60   0.109    -.0045054    .0446671
------------------------------------------------------------------------------

.                         xthybrid coupback xivdem ld persparty xtime,cluster(cowco
> de)vce(cluster cowcode)family(binomial)link(probit)p


Hybrid model. Family: binomial. Link: probit.

+-----------------------------------+
|             Variable |   model    |
|----------------------+------------|
| coupback             |            |
|            W__xivdem |    -0.5110 |
|                      |     0.0750 |
|                W__ld |     0.8349 |
|                      |     0.0045 |
|         W__persparty |     1.7926 |
|                      |     0.0183 |
|             W__xtime |     0.0455 |
|                      |     0.8695 |
|            B__xivdem |    -0.1686 |
|                      |     0.1822 |
|                B__ld |    -1.0824 |
|                      |     0.0242 |
|         B__persparty |     0.1050 |
|                      |     0.8998 |
|             B__xtime |    -0.4536 |
|                      |     0.0870 |
|                _cons |     0.8746 |
|                      |     0.5004 |
|----------------------+------------|
|   var(_cons[cowcode])|            |
|                _cons |     0.3590 |
|                      |     0.4198 |
|----------------------+------------|
| Statistics           |            |
|                   ll |   -52.1009 |
|                 chi2 |    23.9819 |
|                    p |     0.0023 |
|                  aic |   124.2017 |
|                  bic |   181.9964 |
+-----------------------------------+
                          Legend: b/p
Level 1: 2391 units. Level 2: 106 units.

.                         est store coup3

.                         probit coupback ld xivdem persparty xtime xm_*,cluster(li
> d)

Iteration 0:  Log pseudolikelihood =  -75.50456  
Iteration 1:  Log pseudolikelihood = -60.876792  
Iteration 2:  Log pseudolikelihood = -53.914476  
Iteration 3:  Log pseudolikelihood = -53.013005  
Iteration 4:  Log pseudolikelihood =  -52.98955  
Iteration 5:  Log pseudolikelihood = -52.989515  
Iteration 6:  Log pseudolikelihood = -52.989515  

Probit regression                                       Number of obs =  2,391
                                                        Wald chi2(8)  =  39.16
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -52.989515                       Pseudo R2     = 0.2982

                                  (Std. err. adjusted for 592 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
    coupback | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
          ld |   .6960712   .3235208     2.15   0.031     .0619822     1.33016
      xivdem |  -.3658915   .1304382    -2.81   0.005    -.6215457   -.1102374
   persparty |   1.653195   .5479131     3.02   0.003     .5793052    2.727085
       xtime |   .0530061   .2822413     0.19   0.851    -.5001767    .6061888
       xm_ld |  -1.622224   .4403084    -3.68   0.000    -2.485213   -.7592354
   xm_xivdem |   .2323517   .1305822     1.78   0.075    -.0235846    .4882881
xm_persparty |  -1.629599   .8841836    -1.84   0.065    -3.362567    .1033687
    xm_xtime |  -.5002866   .3481944    -1.44   0.151    -1.182735    .1821619
       _cons |   .8304054   .9409269     0.88   0.377    -1.013777    2.674588
------------------------------------------------------------------------------
Note: 9 failures and 0 successes completely determined.

.                         est store coup4

.                         margins,dydx(persparty)

Average marginal effects                                 Number of obs = 2,391
Model VCE: Robust

Expression: Pr(coupback), predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .0181391   .0076064     2.38   0.017     .0032309    .0330474
------------------------------------------------------------------------------

.                         
.                         coefplot (coup1, msymbol(D)mfcolor(white))(coup3, msymbol
> (P)mfcolor(gs1)), ///
>                                 keep(W__persparty W__xivdem W__ld W__xtime )  ord
> er(W__persparty W__xivdem W__ld W__xtime ) ///
>                                 drop(_cons  B__*) xline(0)  grid(glcolor(gs15)) l
> evels(95 90) ///
>                                 coeflabels(W__persparty  = `""Ruling    " "party 
>     " "{bf:personalism}""' ///
>                                 W__xivdem= `""Initial    " "democracy" "level    
>  ""' W__ld = "Democracy age" ///
>                                 W__xtime ="Time trend") legend(lab(3 "Power-grab 
> collapse")lab(6 "Coup collapse.")  ///
>                                 order(3 6)size(small) pos(6) col(2) ring(1)) xsiz
> e(2) ysize(2) xlab(-1(1)3) ///
>                                 xtitle("        Coefficient estimate", size(small
> ))ciopts(lwidth(thin)) aspectratio(1.1) ///
>                                 scale(.95) title(Power-grab and coup collapses, s
> ize(medium) height(2)) ///
>                                 note("Correlated random effects estimator:" "with
> in-estimates reported; between estimates omitted.",size(vsmall)pos(6))
(note:  named style P not found in class symbol, default attributes used)

.                         gr export "$dir\golden\T-Powergrab-Coup-collapse-estimate
> s.pdf",as(pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -Powergrab-Coup-collapse-estimates.pdf saved as PDF format

. 
.                         
.         erase .pdf

.         forval i=1(1)6 {
  2.                 qui erase h`i'.gph
  3.         }

.                         
.         ****************** The End *****************
.                         
.         log close
      name:  <unnamed>
       log:  C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\C
> h4.log
  log type:  text
 closed on:  26 Jul 2023, 17:03:03
-----------------------------------------------------------------------------------
